Skip to main content

Record and Run BAPI File in Process Runner

This topic describes how to send the Customer number from Excel to SAP and retrieve Customer Name, City, Region, Country Key, and Customer Account Group data elements for those customers and place that data in Excel in the different columns using BAPI_CUSTOMER_GETDETAIL2. This Business API (BAPI) is provided by SAP in most SAP releases.

Process Runner supports BAPIs and RFMs that contain nested deep structures beyond the first level. When Process Runner detects a deep structure during recording, it automatically maps all leaf-level fields across the full hierarchy and displays the mapper as a tree. For more information, see Deep Structure BAPI below.

To record and run a BAPI/RFM Process file,

  1. To record the Process file, perform the following steps:
    1. Select File > New Process > New RFM/BAPI or select BAPI/RFM (BA) available on the left side of the New Process window. The New Process window appears.

    2. Enter BAPI_CUSTOMER_GETDETAIL2 in the BAPI/RFM Name field.
    3. Optionally, select More.... Additional recording options are displayed.
    4. Select Start Recording. The Connector for SAP window appears. Perform the following steps:
      1. Select the SAP system, select Logon, and enter the information for Client, User, Password, and Language.

      2. Select OK. Process Runner displays a progress bar to indicate that the recording is in progress.
  2. Process Runnerbuilds the BAPI interface as defined in that SAP system and opens the [BAPI_Customer_Getdetail2 | *New*] Process file as a new file with the Mapper tab open.

  3. To configure the additional settings for BAPI, download the sample data Excel file from BAPI Download Customer Master.xlsx and perform the following steps:
    1. On the Home tab, browse to the Excel file in the Excel File box and select Sheet1 in Sheet name. The results are retrieved in sheet 1 of the Excel file.
    2. To determine the range of numbers that you want to run the retrieval for, enter the Start row and End row.
    3. Set the required options in the Logon And Control Parameters window.

  4. To map the data elements between Excel and SAP, such as instructing Process Runner where to place the customer information that it receives from SAP when a call is made, perform the following steps:
    1. Select Mapper and select the CUSTOMERNO field in Parameter Name column or Customer Number 1 in Field Description column.
    2. Select the mapping type to Excel To SAP.
    3. If the list of the customer numbers is in column A in Excel, assign Map Value to A.
    4. Switch to Advanced View and go to the Dynamic Formula column. For the CUSTOMERNO field, set Add leading zeroes and Length to 10 because the field accepts a 10-digit field. If the customer number is not a 10-digit, leading zeroes are appended to make it a 10-digit code.

    5. In the mapper grid, select the Download from SAP tab and change the mapping type of the Name 1 column to SAP to Excel.
    6. Change the mapping type of the City column to SAP to Excel and save the changes.
    7. Optionally, map the other fields.

  5. To save the Process file, select File > Save > Save As Local, enter the name for the Process file, and select Save. The file is saved with the current date and time. Optionally, you can change the file name and save it.
  6. To run the file, select Run. The customer number from Column A in Excel is taken and this BAPI is run. When SAP returns the result, the selected fields are placed in the various columns in Excel.

Deep Structure BAPI

Process Runner supports BAPIs and RFMs that contain nested deep structures beyond the first level. This is compatible with SAP S/4HANA 2025. The recording steps are the same as described above. When Process Runner detects a deep structure, the mapper displays a hierarchical tree instead of a flat field list.

Node types in the mapper tree

Each node in the tree is one of the following types:

S Structure a single sub-structure containing a fixed set of fields.
T Table a repeating structure that can contain multiple rows of data. Table nodes generate a Start Loop and End Loop row in the mapper automatically.
F Field a leaf-level field that you can map to an Excel column

When recording a deep structure BAPI, note the following:

  • Breadcrumb navigation

    The breadcrumb bar at the top of the mapper shows the full path of the currently selected node — for example, I_DATA > PARTNER > CENTRAL_DATA > BANKDETAIL > BANKDETAILS. Select any level in the breadcrumb to navigate back up the hierarchy.
  • Tab View

    Select a Table (T) node to open the Tab View, which shows only the fields within that table. This makes it easier to review and configure mappings for deeply nested structures.
  • Start Loop and End Loop rows

    Table nodes generate a Start Loop row and an End Loop row in the Mapper. The default block type for table loops is On Value-Ignore Blank. You can change the block type in the Block Type drop-down on the Start Loop row. This feature is currently in beta. The On Value-Ignore Blank block type is fully supported. The Fix Block option is partially supported and may behave differently depending on your use case. The remaining block type options — On Change, On Change-Ignore Blank, and On Blank Cell In Column — are not supported for deep structure BAPIs.
  • Right-click options on table nodes

    Right-clicking a Table node displays the following options:

    • Expand All Children / Collapse All Children — expands or collapses all nested nodes within the table.
    • Add Loop on [table name] — adds an additional loop block for the selected table.
    • Select All Fields — selects all leaf-level fields within the table for mapping.
    • Copy Full Path — copies the full dot-delimited path of the node to the clipboard.

Was this article helpful?

We're sorry to hear that.