loading

How to create a single index table in SAP AIF?

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.
 

Single Index table creation

First of all, we have to create a single index table by copying template table: /AIF/STD_IDX_TBLAt the end of the table add additional field representing purchase order number.

 

Single Index table in SAP AIF
Single Index table in SAP AIF – created based on a template

 

Selection Screen preparation

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:

PROGRAM ZAIF_SEL_SCREEN_0001.
DATA: gv_po_num TYPE bstkd.

SELECTION-SCREEN BEGIN OF SCREEN 0001 AS SUBSCREEN.
SELECT-OPTIONS:
    s_po FOR gv_po_num.
SELECTION-SCREEN END OF SCREEN 0001.

AT SELECTION-SCREEN OUTPUT.
  /aif/cl_global_tools=>get_value_from_mem( ).

 

SAP AIF Customization steps

Now go to  Define Namespace-Specific Features in AIF Customizing. Make an entry as shown in the below screenshot:

SAP AIF - Namespace Specific Entries for Single Index Table
SAP AIF – Namespace Specific Entries for Single Index Table

 

Now from the AIF Customizing open  Define InterfaceSpecific 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.

SAP AIF - Interface Specific entries necessary for Single Index Table
SAP AIF – Interface Specific entries necessary for Single Index Table

 

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!

SAP developer and integration consultant since 2016. Involved in several international projects as ABAP developer, AIF developer and integration consultant. Skilled at a variety of tools and development techniques including OOP in ABAP, Process Observer, Application Interface Framework (AIF), Process Orchestration, BRFplus, Alerts, Proxy, Smartforms, Adobe Forms, SAPscripts, BAdIs, Enhancement Framework, IDocs, ALE and SAP eDocument Framework.Up-to-date and advanced ABAP programming knowledge. Experienced with SAP AIF. Very well organized, focused on the customer and business. Creative thinker, quick to get results.

Leave a Reply

Your email address will not be published. Required fields are marked *

FEATURED

Contact

INT4
ul. Bednarska 1
60-571 Poznan, Poland

 

office(at)int4.com

Write to us