Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
Showing results for 
Search instead for 
Did you mean: 
I read many SDN blogs on SAP AIF interfaces and its concepts. Based on the knowledge acquired from multiple blogs, I am writing this article in step wise by simplifying, implementing many of AIF features in one valid business case and to allow readers to get quick idea of SAP AIF interface implementation. Thank you michal.krawczyk2 for all your effort and sharing knowledge through various blogs.

Business case: Supplier uses Advanced shipment notification (ASN) document to inform customer that he or she has sent the customer a delivery. Assuming this document sent in IDOC format to create inbound delivery in SAP. SAP application interface frame work to be used for processing these ASN inbound IDOC’s and monitoring its success and error IDOC postings by vendors, materials etc. Following is the step wise approach to process ASN IDOC within SAP AIF and how it allowed us, to use standard SAP AIF monitoring transaction /AIF/ERR for it.

  1. Create namespace for grouping of interfaces and to control accessing it. Use transaction code /AIF/CUST for it.

Config path 1


e.g. Created ZP2P Namespace to group all interfaces relevant to P2P scenarios


  1. For inbound ASN IDOC basic idoc type is DELVRY07 and valid message type is DESADV. Using Basic IDOC type and message type generate interface structure from transaction code /AIF/IDOC_GEN. Here i took IDOC process scenario 2 for processing idoc’s within SAP AIF. Input selection field entries appear as shown below.

AIF Interface Generator

After successful execution, AIF IDOC interface structure ZP2P_AIF_ASN generated and assigned to our interface IN_ASN.

AIF Interface structure

Assignment of ASN_IN interface generated to the name space ZP2P.

AIF Interface Config path

AIF Interface

Interface engine generated; Our ASN interface should be able to process IDOC within SAP AIF, update additional index tables for more specific selection of idoc segment fields and to provide log of it.

Interface engine - Config path

Interface engine

  1. Assign IDOC type DELVRY07 and Message type DESADV to the interface ASN_IN; I used message function to process ASN IDOC’s always in SAP AIF.

  2. Define action ZP2P_ASN_PROCESS and assignment to interface IN_ASN; This allows interface to process ASN idoc

Define Action

Define Action


Action - SAP Config path

Action assignment

  1. Function module ZP2P_AC_ID_CREATE created and assigned to action ZP2P_ASN_PROCESS

FM Assignment to Action

Create custom function group ZP2P_AIF and function module ZP2P_AC_ID_CREATE assign to action ZP2P_ASN_PROCESS.

Standard SAP uses FM /SPE/IDOC_INPUT_DESADV1 for ASN Idoc postings. Code implementation for our FM ZP2P_AC_ID_CREATE as follows.


FM for Action

  1. Use transaction WE57 to create entry for assignment of ASN inbound idoc messages to process within SAP AIF.

  1. Create custom process code ZDLS from Transaction WE42

  1. Maintain partner profile from transaction code WE20

8. Creation of custom single index table ZP2P_ID_INX_SGL with fields VBELN and LIFEX; This single-index table used for saving message processing information along with ASN document header level index fields in AIF.


9. Creation of custom multi-index table ZP2P_ID_INX_MUL; This multi-index table used for saving message processing information along with ASN document item level index fields in AIF.

10. Create ZP2P_AIF_SEL_SCREEN module pool program for custom selection subn monitoring and error handling.

11. Assign custom tables ZP2P_ID_INX_SGL and ZP2P_ID_INX_MUL and custom

12. Selection screen inputs for search assignment to interface

  1. Testing Inbound ASN IDOC using IDOC test tool: Transaction WE19

  2. Standard SAP transaction code /AIF/ERR allows us to monitor logs. Inputs for our case as follows

This is my first SAP Blog, Although it seems repeating from different blogs with cuts & pieces. For better understanding, I implemented different SAP AIF features with essential steps required in one of standard sap valid business process.

I am looking forward from readers for suggestions and comments on it.

Relevant helpful blogs:

Thank you.








Labels in this area