Blog > Michal’s Tips: AIF 3.0 – tRFC monitoring (using table ARFCSSTATE)

Michal’s Tips: AIF 3.0 – tRFC monitoring (using table ARFCSSTATE)

Michał Kowalczewski Int4 IFTT Product Manager, SAP Press Author
icon__calendar 2015-01-25

Introduction

When an SAP backend system is being called from another SAP backend system with the use of tRFC currently we have no ways of monitoring errors in such integration scenarios. In case the tRFC call fails on the destination system in some cases the users on the calling system would like to:

  • know what kind of error occured in the destination system
  • restart the tRFC call without running the initial transaction

SAP AIF version 3.0 – new functionality

AIF 3.0 (new version available as of October 2014) offers a new functionality which can help to solve both of those issues. It’s now possible to create an AIF interface which will enable monitoring of tRFC calls which ended with an error on the destination system. Furthermore with AIF 3.0 it’s also possible to restart those errors and even debug the tRFC calls on the destination system directly from the calling system. Below you can find a list of steps required to customize such an integration scenario.

Step 1

Create an RFC enabled function module on the destination SAP backend system or use an existing one.

Function Builder SAP AIF

Step 2

Create the AIF interface on the SAP backend system which will be calling remotely the RFC created on the destination SAP backend system from the previous step. You can create this new AIF interface by running a new, special report: /AIF/RFC_FUNC_GEN with the following parameters:

  • RFC Type – select – tRFC status table
  • Original RFC Function Name – the name of the RFC enabled function module which exists only on the destination SAP backend system (from Step 1)
  • Prefix of New Objects – prefix for the new created objects
  • Playback Function Name – this module will be created in the calling SAP backend system with the same signature as the original one from the destination . We need this module for the data transformation.
  • Name of AIF Structure – which will be automatically generated on the basis of the structure of the RFC enabled function module
  • Destination for Original Func. – this is the RFC destination of the SAP backend system on which the RFC enabled function module will be executed (destination SAP backend system)
  • Namespace – namespace of your new AIF interface
  • Interface Name – interface name of your new AIF interface
  • Interface Version – interface version of your new AIF interface

Function Module Generator SAP AIF

Step 3

Execute the report/transaction on the calling SAP backend system which will send the data to the destination SAP backend system. Only if the tRFC call fails we will be able to monitor that call in AIF. In case the call is successfull we will not see any data in the AIF monitoring transactions. As you can see on the figure below the failed tRFC calls are visible in the AIF monitoring transaction and we can even monitor the data from the RFC structures (name, data, creator).

Error Handling SAP AIF

Once the call failes as shown in the figure above we will be able to restart the call from AIF using the restart button or even debug the tRFC call using the debug button. Debugging will take the user from the calling SAP backend system to the destination SAP backend system on which the RFC module is being executed as shown in the figure below.

ABAP Debugger

Please keep in mind that once all tRFCs calls are successfully corrected all the entries from the AIF monitoring transaction will be gone and not marked as successfully completed as with other AIF scenarios.

Reference:

tRFC and qRFC – SAP Application Interface Framework – SAP Library

 


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.

Contact us

If for any reason, the thought of reaching out to us has crossed your mind, then by all means do not hesitate to get in touch with us, as we are more than happy to put to rest all of your concerns.