Blog > Michal’s Tips: AIF – alert recipient based on error message class and message ID

Michal’s Tips: AIF – alert recipient based on error message class and message ID

Michał Kowalczewski Int4 IFTT Product Manager, SAP Press Author
icon__calendar 2016-08-19

SAP AIF alerts creation

When integration related error handling needs to be solved quickly we need to make sure correct users are getting notified. When AIF is correctly implemented (with a clear guidelines on what kind of integration patterns should be done in SAP PO and what needs to be done in SAP AIF) we already have the first level of speeding up the error handling as technical users don’t receive any alerts from SAP AIF since they go directly to the business users. Sometimes however it’s not enough to send all SAP AIF alerts even from a single interface to a single specific person or group as a single IDOC can have many times of errors like master data, SD customizing, MM customizing, FI related. With SP04 for SAP AIF SAP has came up to the rescue in such cases. We can now create AIF alerts for different support groups and assign only specific error messages to each of them.


Solution step by step

Steps required for setting up this new functionality will require creating a new, custom alert category which will be used to receive the alerts by e-mail, creating a new recipient assignment table, creating a new message category (which in this case will hold all sales module related errors), assigning error message classes and error message IDs to the message category, populating recipient assignment table and assining the configuration in AIF customizing.

Step 1

Create a new alert category of type SAP Application Interface Framework with transaction ALRTCATDEF and populate it with some text which will help the business users to understand which message is the one they should be looking similarly as per figure below.

Step 2

Next step is to create a new recipient assignment table by copying the template table /AIF/RECA_TMPL which will store the assignments created in further steps.

Step 3

Transaction /AIF/MSG_CAT_DEF allows us to create a new message category like SALES_ERRORS which will be later assigned to the AIF recipient.

Step 4

Transaction /AIF/MSG_CAT_ASGN is used to assign all message classes and respective message numbers to the AIF message category created in the previous step as shown in figure below.

Step 5

As the next customizing step we need to create a new alert customizing where we will assign the recipient assignment table and custom alert category. This step can be done using the following menu: /AIF/CUST -> Error Handling -> Define Namespace-Specific Features -> Configure Alerts

Step 6

We also need to create as many recipients as different teams which will be receiving the alerts as shown in the figure below.

Step 7

As the last customizing activity we can populate the recipient assignment table with interface related info, message category and recipient who will receive all alerts from a specified message category as shown in figure below.

Result

As a result each time your interface will encouter any of the errors specified in step 4 an recipient of type specified in step 6 will be triggred and the users assigned to this recipient will receive an e-mail customized in step 1.

Further information:

SAP page about this configuration:  help.sap.com


Michał Krawczyk – SAP integration consultant since 2004. He has been recognized by SAP included becoming an SAP Mentor in 2007 and winning the top contributor/topic leader award from SDN (SAP Developer Network portal) in SAP PO/PI eight times. Michal is the author many SAP integration related books.

Michał Kowalczewski Int4 IFTT Product Manager, SAP Press Author
SAP integration consultant & architect, team leader and project manager since 2005. Experienced in all leading SAP integration technologies (SAP PI/PO, ALE, HCI, BRF+, Enterprise Services, ABAP). Int4 IFTT Product Manager. In the past he was also involved in SD and CRM consulting. Accomplished more than 20 projects, both full cycle implementation and improvement projects. He holds a master?s degree in computer science and econometrics and is an SAP-certified solution and development consultant as well as SAP PRESS author. Business integration improvements, highly focused on the business processes, deep knowledge of ECC backend and SAP configuration (ALE, SD, MM, FI), advanced ABAP and PI/PO programming, strong leadership & management skills.