AIF Monitoring Archives - INT4 Your soft landing in SAP API testing Tue, 29 Jun 2021 12:51:29 +0000 en-GB hourly 1 https://wordpress.org/?v=6.0.8 /AIF/ERR – AIF Monitoring and Error handling https://test11988.futurehost.pl/aif-err-aif-monitoring-and-error-handling Thu, 20 Feb 2020 14:30:57 +0000 https://www.int4.com/?p=3341 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 […]

The post /AIF/ERR – AIF Monitoring and Error handling appeared first on INT4.

]]>

SAP AIF

(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:

  • how to use /AIF/ERR – AIF Monitoring and Error handling tool – from the selection screen up to the results.

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: 

  • Application Selection: 

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.

AIF Application selection

 

  • Application-Specific Selection

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. 

AIF Application Specific Selection

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. 

AIF select interface

What is worth mentioning we can narrow our search results, even more, limiting them to selected message classes (5) and numbers (6)

 

  • More Specific Selection 

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/

AIF More specific selection

  • Generic Selection

Generic Selection AIF

In Generic Selection we can restrict results to time periods or even specific messages by providing Message GUIDs (8). 

 

  • Status selection

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. 

Status selection AIF

Now let’s take a quick look at the Results overview. Initially, it consists of 4 quarters: 

Results overview AIF

  • Data messages (11) containing a list of messages matching our selection criteria. From here we can i.e. restart selected messages, view selected message in WE02 IDOC monitoring (IDOC interfaces), or with a single click check RFC connection (PROXY interfaces)

 

  • Log Messages (12) containing status messages

 

  • Data Structure (13) displaying a message in a tree-like structure. Double-clicking on any of the nodes results in the row data to appear in the last quarter (14) 

 

If we have executed the transaction in the Technical Mode (9) in the results, we will be able to benefit

Additional parameters AIF

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:

Structure of interface aif

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:

SAP Press books int4

The post /AIF/ERR – AIF Monitoring and Error handling appeared first on INT4.

]]>
How to create a single index table in SAP AIF? https://test11988.futurehost.pl/how-to-create-a-single-index-table-in-sap-aif https://test11988.futurehost.pl/how-to-create-a-single-index-table-in-sap-aif#comments Mon, 28 May 2018 15:49:44 +0000 https://www.int4.com/?p=1532 Speed up your monitoring process by using single index table in SAP AIF!

The post How to create a single index table in SAP AIF? appeared first on INT4.

]]>

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.

How to create Single Index table?

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 articles about SAP AIF on Int4 blog.

The post How to create a single index table in SAP AIF? appeared first on INT4.

]]>
https://test11988.futurehost.pl/how-to-create-a-single-index-table-in-sap-aif/feed 2
Michal’s Tips: ECH monitoring for Enterprise Services in AIF https://test11988.futurehost.pl/michals-tips-ech-monitoring-enterprise-services-aif Wed, 09 Dec 2015 09:28:52 +0000 http://www.int4.com/?p=707 Let me demonstrate the idea of using the AIF for the second case. Prerequisite OSS note  2094472 : Support of standard enterprise services. Step 1 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 […]

The post Michal’s Tips: ECH monitoring for Enterprise Services in AIF appeared first on INT4.

]]>

ECH monitoring for Enterprise Services in AIF

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:

  •  one for monitoring ECH messages
  •  one for monitoring successful proxies

Let me demonstrate the idea of using the AIF for the second case.

Prerequisite

OSS note  2094472 : Support of standard enterprise services.

Step 1

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:

  • Application Engine = ECH
  • Persistence Engine = ECH
  • Selection Engine = ECH
  • Logging Engine = ECH

Step 2

In step 2 you need to assign the correct ECH component to the ECH AIF interface – Interface Development -> Additional Interface Properties -> Assign ECH Component

Step 3

You also need to perform all of the manual steps from the OSS note:

  • create the implementation for two enhancement spots /AIF/ERROR_HANDLING and /AIF/ENGINES
  • perform the manual post customizing which includes creating a custom function. This function will allow you to navigate between the AIF message of the proxy interface to the same AIF message in the ECH interface. This way you can not only work with specific functions of two monitors but also drill down to both of them (to proxy monitor from proxy interface  and to ECH monitor from the ECH interface). You can find the information on how to create the custom function on the screenshots below.

 

Define custom functions

Figure 1 – Custom function for ECH monitoring

Define parameters ID's and Values

Figure 2 – Parameters for custom function for ECH monitoring

How does it work

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.

AIF Error Handling

Figure 3 – ECH drilldown from AIF Proxy interface

References: 

You can find some more info on ECH, proxy monitoring and AIF in my book : SAP SOA Integration – Enterprise Service Monitoring.

Special thanks:

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.

]]>