Have you ever heard about single index table in SAP AIF? Have you ever encountered the issue while you were looking for a specific message in Monitoring and Error Handling? Let’s imagine the situation, that you receive tons of inbound messages every single day and you want to find a message with a specific purchase order number in your AIF Interface, but you don’t know what is the AIF message ID that contains this specific Purchase Order number.
Here, single index table in SAP AIF with custom selection screen for the interface come to help us!
In this post, I will guide you how to create a select index table, create a module pool program and configure index table and the selection screen for the inbound sales order interface in SAP AIF.
First of all, we have to create a single index table by copying template table: /AIF/STD_IDX_TBL. At the end of the table add additional field representing purchase order number.
Now go to SE38 transaction code and create module pool program type, that will be used for selection screen extension in AIF Monitor and Error Handling.
Please see the code snippet you can use for your program:
DATA: gv_po_num TYPE bstkd.
SELECTION-SCREEN BEGIN OF SCREEN 0001 AS SUBSCREEN.
s_po FOR gv_po_num.
SELECTION-SCREEN END OF SCREEN 0001.
AT SELECTION-SCREEN OUTPUT.
Now go to Define Namespace-Specific Features in AIF Customizing. Make an entry as shown in the below screenshot:
Now from the AIF Customizing open Define Interface–Specific features and in node Define Key Fields for Multi. Search make an entry as below, where BSTKD is a key field name in your Index Table and S_PO is your parameter from selection program. E1EDK01-BELNR will be the source field.
Congratulations! Right now you can go to AIF Monitor and Error Handling and search messages by specific Purchase Order Number
Want to learn more about indexing in SAP AIF? Check other blogs about SAP AIF here!
Write to us