The post /AIF/ERR – AIF Monitoring and Error handling appeared first on INT4.
]]>(Application Interface Framework) is a powerful tool which not only makes it possible to separate business logic from technical mappings but also allows for interface monitoring. In this blog, I would like to shed some light on the AIF error handling solution that can be accessed through /aif/err t-code.
This blog explains:
Keep in mind that in order to trace any interface traffic the monitoring functionality has to be set up for a particular interface. If you don’t know how to perform the initial steps please check this blog by Mateusz Nowak:
https://www.int4.com/enable-monitoring-of-idoc-interfaces-in-sap-aif-in-less-than-3-minutes/.
When we initially access /aif/err the first thing that catches the eye is a complex selection screen divided into different sections. Selection details are required to filter out interfaces and messages we are interested in:
In the application selection, we must provide an error handling application?s unique ID. This is the application to be used for Monitoring and Error Handling. By default, it’s always AIF.
The Next step is to provide the Namespace (2), Interface Name (3) and version (4) of the interfaces we want to monitor. We can provide more than one interface name, but the results will be limited to interfaces within a single namespace. If we would like to view traffic across all interfaces that go through AIF we must leave these selection screen fields empty.
The easiest way to select a single interface is to use the Select Interface button (7), which reveals a tree-structure view of all available interfaces and their versions.
What is worth mentioning we can narrow our search results, even more, limiting them to selected message classes (5) and numbers (6).
In order to facilitate filtering out the relevant messages, custom selection fields can be set up. This, however, requires creating index tables and additional module pool report for the selection screen. If you would like to get more familiar with this concept please read https://www.int4.com/how-to-create-a-single-index-table-in-sap-aif/.
In Generic Selection we can restrict results to time periods or even specific messages by providing Message GUIDs (8).
Finally, status selection allows us to view only messages with certain status i.e. which are currently In Process or that stopped processing due to Technical Errors.
Now let’s take a quick look at the Results overview. Initially, it consists of 4 quarters:
If we have executed the transaction in the Technical Mode (9) in the results, we will be able to benefit
from an additional view containing a structure of Interface Processing. It will allow us to determine at which stage of interface processing an error occurred i.e. In this case, we have an error that came up during mapping->checks stage:
The technical view can be switched on while the results are already displayed but be aware that special authorization might be required. Another Additional Parameter that can be useful is an emergency correction (10). If the checkbox is marked all fields of the message can be edited – no matter whether they were defined as editable in AIF customizing or not.
If you want to learn more about AIF’s advanced features, please check these books by our SAP Press authors:
The post /AIF/ERR – AIF Monitoring and Error handling appeared first on INT4.
]]>The post How to create a single index table in SAP AIF? appeared first on INT4.
]]>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:
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( ).
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 articles about SAP AIF on Int4 blog.
The post How to create a single index table in SAP AIF? appeared first on INT4.
]]>The post Michal’s Tips: ECH monitoring for Enterprise Services in AIF appeared first on INT4.
]]>Most of the SAP delivered Enterprise Services use the Error and Conflict Handler (ECH) to handle messages which end up with errors. AIF seems to be integrated with ECH but there are many ways to enable this integration. We can either turn off ECH to monitor ECH completely in AIF (ECH will not be used at all) or we can make AIF use ECH error status messages. The second approach is much better in cases where the SAP delivered Enterprise Service used some other ECH functionalities which would stop working if ECH is completely turned off. The only difficulty is that you need two AIF interfaces to monitor a single interface:
Let me demonstrate the idea of using the AIF for the second case.
OSS note 2094472 : Support of standard enterprise services.
As per OSS note you need to define two AIF interfaces for the same inbound proxy class: one for ECH and one for Proxy. The main difference will be the Interface engine configuration where for proxy interface you can use the default values but for ECH you need to use ECH for all engines:
In step 2 you need to assign the correct ECH component to the ECH AIF interface – Interface Development -> Additional Interface Properties -> Assign ECH Component
You also need to perform all of the manual steps from the OSS note:
Figure 1 – Custom function for ECH monitoring
Figure 2 – Parameters for custom function for ECH monitoring
Now when you try to monitor your message AIF you only need to open the proxy version of your interface as it will always contain both types of messages (correctly processed and incorrectly processed). For the ones which failed you will see a status message saying that the error is in ECH and by using the arror you can drill down to the ECH version of the AIF interface from where you can perform all ECH related activities.
Figure 3 – ECH drilldown from AIF Proxy interface
You can find some more info on ECH, proxy monitoring and AIF in my book : SAP SOA Integration – Enterprise Service Monitoring.
Verena Woerner for helping me with customizing of this functionality.
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.
The post Michal’s Tips: ECH monitoring for Enterprise Services in AIF appeared first on INT4.
]]>