Mentor SAP

Processing Inbound IDocs without AIF

Before we look at the processing of IDocs within AIF we need to know the standard IDoc functionality.

 

 

IDocs can be sent with different protocols, but normally the Remote Function Module (RFM) IDOC_INBOUND_ASYNCHRONOUS is called. It saves the Data delivered from the IDoc directly on the database as Characters.

At this point it does not make a difference which kind of Data (Materials, Orders etc. ) are sent.

 

 

To Split between a technical part of the IDoc transmission that is the same for all Message Types and a Business Part that does the Posting of the IDoc and is different per Object that shall be created, brings the benefit of handling errors at the receiving side.

 

For each combination of Partner and Message Type the partner inbound profile gives a process code. This process code tells the system how to post the IDoc.

 

 

To use a Function Module to process an inbound IDoc the system has to be told which one to use in Transaction WE20 the Partner Profile. But it is not possible to use any Function Module. The System needs to have a connection between the Function Module the Message Type and the Basis type. This is done in transaction WE57. If an Function Module is connected to a Message Type / Basic type combination it can be used inside a Process Code in transaction WE42.

 

Only those Process Codes can be used in the Partner Profile .

 

IDoc Scenarios

 

AIF can monitor IDocs that are already in the system. This helps you to find errors and to use the AIF Mass Changing function if you have the same error very often.

 

Also IDocs can be processed by AIF. Then you can also use the mappings Checks and other AIF functions.

 

Prerequisites to Process IDocs in AIF

The IDoc Segments are single structures in the DDIC and we have special transactions that tell the system how these structures form a special IDoc Message Type. Unfortunately that means the IDOc structures already in the system cannot be used for AIF Interfaces. An AIF Interface needs one root structure for the RAW Structure and one Structure for the SAP Structure. AIF helps you to create these structures from IDoc Types.

 

Generation Report

 

An IDoc basic type can be very large. Creating a DDIC structure that corresponds to the basic type can be very difficult especially if extensions have to be considered for the IDoc. The AIF generation report creates or updates the required structure for a basic type.

 

You can open the generation report via transaction code /AIF/IDOC_GEN.

 

The IDoc Structures are already defined inside SAP with Data structures that can be shown and used in Transaction SE11. Different line Types socalled segments are used for each different line.

 

As AIF needs ONE Data Structure for the whole message those segments can not be used directly. The IDoc Generation Report can create the needed root structure for every IDoc you want to use.

 

It also already creates the Interface using the correct engines for the IDoc Processing Scenario you want to use.

 

Scenario 1 - Monitoring IDocs with AIF

 

With IDoc scenario 1, you can monitor existing IDocs in the Monitoring and Error Handling transaction. The processing of the IDocs is not influenced by AIF. The scenario uses only the monitoring capabilities of Monitoring and Error Handling.