Skip to Content

Enhance a Proxy Interface with Preprocessing

Requires Customer/Partner License
Enhance an existing "monitoring only" proxy interface to be able to carry out data checks and mappings using the preprocessing capability of SAP Application Interface Framework before actually calling the proxy interface.
You will learn
  • How to enhance a proxy interface in SAP Application Interface Framework using the preprocessing capability
  • How to implement data checks and mappings in SAP Application Interface Framework
MelanieCueppersMelanie CueppersApril 19, 2022
Created by
MelanieCueppers
April 19, 2022
Contributors
MelanieCueppers

Prerequisites

In this tutorial, you will learn how to enhance a simple proxy interface in SAP Application Interface Framework by enabling the preprocessing capability.

  • Step 1

    Go to Customizing for SAP Application Interface Framework (transaction code /n/AIF/CUST) and navigate to Interface Development > Define Interfaces. In the upcoming dialog, enter your previously created namespace DEMO_2, and continue.

    Enable Change mode. Double-click the existing interface FLBOOK to open it and select the Pre-Processing flag.

    Define Interfaces

    Save your changes.

  • Step 2
    1. While in Customizing (transaction code /n/AIF/CUST), navigate to Interface Development > Define Structure Mappings.

    2. In the upcoming dialog, enter your previously created namespace DEMO_2, interface name FLBOOK, and interface version 1. Select Continue.

    3. Select New Entries and enter the root node of your interface structure, here SXIDAL_FBO_REQUEST.

      Create New Source Structure
    4. Select the new entry and double-click Assign Destination Structure in the menu on the left.

    5. Select New Entries and enter the Number of Structure Mapping 10. As Destination Structure, enter the same root node of your interface structure, SXIDAL_FBO_REQUEST. Finally, select the Move Corresponding Fields flag.

      Assign Destination Structures
    6. Save your changes.

  • Step 3

    In Message Maintenance (transaction code SE91), create a new message class named ZDEMO_MESSAGE. In tab Messages, add a new message with the message short text Agency must not be empty.

    Create New Message Class

    Save your changes.

  • Step 4
    1. Go back to Customizing > Interface Development > Define Structure Mappings to see the structure mapping of your interface and add a check. Enter your namespace DEMO_2, interface FLBOOK, version 1, and continue.

    2. With your source structure SXIDAL_FBO_REQUEST selected, double-click the node Assign Checks in the menu on the left. In Change mode, select New Entries to add a new check, and enter or select the following details:

      Field Value
      Number of the Check 10
      Namespace DEMO_2
      Check AGENCY_EMPTY
      Check Raw data check the flag
      Ignore Data If Check Is Not Successful Treat as error if check is not successful
      Field name 1 AGENCY_DATA-AGENCY_ID
    3. Press Enter. Because the check doesn’t exist yet, you are asked to create the new check.

      Add New Check
    4. Save the new entry.

    5. Double-click the new check to further define it. A new window opens in which you can enter the following information:

      Field Value
      Check Description Enter a meaningful description, for example Check agency not empty
      Error Message Class ZDEMO_MESSAGE
      Error Message Number 002
      Define Check
    6. Navigate to Define Single Checks and enter the following information for the single check:

      Field Value
      Check Description Enter a meaningful description, for example Check agency not empty
      Field Check Not Empty
      Define Single Checks
    7. Save your changes and close the new window.

  • Step 5

    Go to Customizing for SAP Application Interface Framework (transaction code /n/AIF/CUST) and navigate to Error Handling > Define Interface-Specific Features.

    In the upcoming dialog, enter namespace DEMO_2, interface FLBOOK, and version 1, then press Enter.

    Double-click Define Changeable Fields in the menu on the left. Add a new entry with Index number 10 and Field Path AGENCY_DATA-AGENCY_ID.

    Define Changeable Fields

    Save your changes.

  • Step 6

    After the setup is complete, you should test your settings and verify that the check and the proxy monitoring are working as planned.

    For detailed steps about sending test messages, see the tutorial Create a Simple Proxy Interface.

    Send in a new test message with an empty agency ID.

    New Test Message in Postman

    If you’re using SAP GUI, check the results of your test in the Interface Monitor (transaction code /n/AIF/IFMON).

    When you select the summary line for your recipient, you’re forwarded to Monitoring and Error Handling, where you can see your selected test message. It should be in status Error with the message text Agency must not be empty.

    Error Handling without Agency ID

    As you can see from the data, the field AGENCY_ID is empty. Since you defined the field as a changeable field in the previous step, you can fix the issue by maintaining a value for the empty field, here 109. Save and restart the message.

    Error Handling with Agency ID

    Alternatively, if you have set up Message Monitoring in the SAP Fiori launchpad, you can check the test results there. For more information, see How to configure the SAP Fiori Apps for SAP Application Interface Framework.

    In the Message Monitoring app, select the message, switch to Edit mode, and change the agency ID. Save your changes.

    Message Monitoring Before Restart

    Select Restart. After the restart, the message is processed successfully.

    Message Monitoring After Restart

    Congratulations! You have enhanced a proxy interface with preprocessing in SAP Application Interface Framework.

  • Step 7

    Which activities are supported using preprocessing?

Back to top