Combine Outbound IDoc to XML Message Using AIF

Use

In this scenario, different outbound IDocs can be combined in one XML message.

Integration

For this scenario, an SAP Application Interface Framework XML interface and a port function are required.

The required interface can be created in Customizing for SAP Application Interface Framework under Interface Development -> Define Interfaces. If required, select the Move Corresponding or the Preprocessing checkbox. For the raw and SAP data structure, use the /AIF/MERGE_IDOCS_TO_AIF_MSG structure. If you require further logic, for example, checks and value mappings, you can define these in Customizing for SAP Application Interface Framework under Interface Development -> Define Structure Mappings.

Combine Outbound IDoc to XML Message Using the SAP Application Interface Framework

In the scenario for processing IDocs shown in the graphic above, the port function combines the collected IDocs in one XML message and hands it over to the SAP Application Interface Framework for further processing. Follow up processing is triggered via an action in the interface.

To set up this scenario, you require a port function. The SAP Application Interface Framework delivers the /AIF/MERGE_IDOCS_TO_AUIF_MSG function module for you to use as function module for the port function. Besides creating the port function, you need to adjust the partner profile of the IDoc that is to be sent. You also need to maintain the new port function in the receiver port. You can reuse the port function for different basic types. If the port function does not meet all of your requirements, you can create and use your own port function.

You need to maintain all required mappings and add an action to trigger the follow up processing.

Features

In this scenario, the following are possible in the SAP Application Interface Framework:

  • Using the Interface Monitor

  • Creating checks, value mappings, and field mappings

  • Selecting data from index tables

  • Defining key fields

  • Defining an interface-specific selection screen, which can be used to facilitate a selection of messages if customized

  • E-mail notification

Activities

Engines

You have to assign engines to interfaces in Customizing for SAP Application Interface Framework under Start of the navigation pathInterface Development Next navigation step Additional Interface Properties Next navigation step Specify Interface EnginesEnd of the navigation path as follows:

  • Application engine for XML

  • Persistence engine for XML

  • Selection engine for index tables

  • Logging engine for application log

Preprocessing

The SAP Application Interface Framework can use preprocessing to execute some logic on top of IDoc raw message data with limited maintenance effort. If you want to activate preprocessing, when you are defining the first interface, select the Preprocessing checkbox in Customizing for SAP Application Interface Framework under Start of the navigation path Interface Development Next navigation step Define InterfacesEnd of the navigation path (see Preprocessing).