In this scenario, IDocs are processed using the SAP Application Interface Framework and an IDoc function module is called in an action.
In order to display the IDoc in Monitoring and Error Handling
, you have to create a raw and an SAP data structure for an IDoc’s basic type and you need to define an SAP Application Interface Framework interface. To do this, use the Generate IDoc Structure and Interface Definition
report (transaction code /AIF/IDOC_GEN, see Generate IDoc Structure and Interface Definition).
The raw and SAP data structures are the same. In Customizing for SAP Application Interface Framework
(transaction code /AIF/CUST) under , you must select the Move Corresponding
checkbox to facilitate using transformation in the technical mode of Monitoring and Error Handling
.
Process IDocs Using AIF and Calling IDoc Function Module in Action
In the scenario for processing IDocs shown in the graphic above, the IDoc from the legacy system is processed in the SAP Application Interface Framework where index tables are written.
A generic process function is delivered with the SAP Application Interface Framework. A new process code and message type are needed. The process function transforms the IDoc data into the raw data structure defined in Customizing for SAP Application Interface Framework
. Afterwards the interface is determined and processing in the SAP Application Interface Framework is triggered.
In this scenario, you have to create an action. Within the action function module, the data needs to be converted from the SAP data structure to the IDoc control record and the IDoc data. A standard IDoc process function can then be called. If application log messages and status records are to be added to the AIF application log, this has to be done within the action function as well.
If data is to be displayed in the Data Content view, the IDoc data has to be transformed into the raw data structure.
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
You have to assign engines to interfaces in Customizing for SAP Application Interface Framework
under as follows:
Application engine for IDocs
Persistence engine for IDocs
Selection engine for index tables
Logging engine for application log