How to create function modules

Semarchy xDI needs various SAP function modules to integrate SAP S/4HANA data.

The necessary modules have their setup information defined in text files, inside the download resource ZIP file. When the SAP S/4HANA setup process has you create a function module, open the requested text files, and use them with the instructions on this page.

setup.create function module01

Overview

The process to create SAP function modules is common to all function modules:

  1. Create a function module by launching transaction SE37.

  2. Set the name and group.

  3. Define the following parameters:

    • Attributes

    • Imports

    • Exports

    • Changing

    • Tables

    • Source code

  4. Save your work.

Creation process

  1. Open an SAP resource text file with function module information.

  2. In SAP S/4HANA, launch transaction SE37.

  3. In the Function Module field, enter the name from the resource text file, on the line labeled FUNCTION MODULE.

    setup.create function module02

  4. Click on Create.

  5. In the Create Function Module dialog box, make sure the fields match the resource text file.

    setup.create function module03

  6. Click Save.

  7. In the Information dialog box, click on the check mark.

    setup.create function module04

  8. Continue to set function parameters.

Define attributes

  1. Go to the Function Builder Attributes tab.

  2. Fill out the Short Text field with the description.

  3. Set the Processing Type to either Normal or Remote-Enabled, based on the information in the resource text file.

    setup.create function module05

Define imports

  1. Go to the Function Builder Import tab.

  2. Find the IMPORT section of the resource text file.

  3. If there is an IMPORT section with parameters, add them to SAP S/4HANA, with their corresponding attributes.

    setup.create function module06

Define exports

  1. Go to the Function Builder Export tab.

  2. Find the EXPORT section of the resource text file.

  3. If there is an EXPORT section with parameters, add them to SAP S/4HANA, with their corresponding attributes.

    setup.create function module07

Define changing

  1. Go to the Function Builder Changing tab.

  2. Find the CHANGING section of the resource text file.

  3. If there is a CHANGING section with parameters, add them to SAP S/4HANA, with their corresponding attributes.

    setup.create function module08

Define tables

  1. Go to the Function Builder Tables tab.

  2. Find the TABLES section of the resource text file.

  3. If there is a TABLES section with parameters, add them to SAP S/4HANA, with their corresponding attributes.

    setup.create function module09

Define source code

  1. Go to the Function Builder Source code tab.

  2. Find the SOURCE CODE section of the resource text file.

    setup.create function module10

  3. Copy the text from the SOURCE CODE section of the resource text file, and paste it into SAP S/4HANA.

    • Do not copy the line made up of dots (…​…​…​..). This line serves as a visual separator.

      setup.create function module11