Blog > AIF Index Tables: IDOC qualifiers

AIF Index Tables: IDOC qualifiers

AIF index tablles idoc qualifiers
Michał Lubczyński SAP Integration Consultant
icon__calendar 2020-02-28

AIF Index Tables: IDOC qualifiers

AIF allows for indexing field values in order to facilitate filtering out messages in its message monitoring – /AIF/ERR. For this purpose, Index Tables are used. They keep all the data that comes through the particular interface in selected fields.

From this step-by-step manual you will learn:

  • how to deal with IDOC qualifiers when implementing index tables in AIF IDOC scenarios.

Things get a bit more complicated when it comes to an IDOC scenario. Some IDOC segments contain qualifiers, which hold value that determines other fields within the segment. I.e. in the IDOC basic type INVOICE02 segment E1EDK02 has a BELNR field, that for qualifier = ‘001’ is the Customer Purchase Order number and for qualifier = ?009? is the invoice number. This way the same field of a structure can be used to maintain different types of data.

Now let?s say the requirement is to index only BELNR values with these two qualifiers, and to keep them under two separate fields.

While we define our fields of EDI_BELNR data type in Error Handling -> Define Interface- Specific Features-> Define Key Fields for Multi Search we must remember to mark checkbox Key Field Rule. Then, in the Function Module field we pass reference to a FM that contains our logic for processing the BELNR values depending on the qualifier value. 

Define Key Fields for Multi Search

Field Sequence

 

In this sample function module we store BELNR values only if the 3 initial characters of sdata structure (it?s where the qualifier value resides) are equal to ‘009’.

 

However we must keep in mind that this will work only for Single selection type index tables.

Conclusion

If you would like to learn more about AIF Index tables please read these blogs by Mateusz Nowak:

Michał Lubczyński SAP Integration Consultant
SAP integration consultant since 2016. Experienced in end-to-end PI interface configuration, AIF, IDoc business scenarios, and banking interfaces. An acquaintance of SAP Material Management and Sales and Distribution modules. Implementation consultant of Int4?s automated interface testing solution - Int4 IFTT. Strong SAP PI/PO skills. Conscientious and goal-oriented team player, good at communication and building relationships.