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:

a) know what kind of error occured in the destination system

b) restart the tRFC call without running the initial transaction

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.

/wp-content/uploads/2015/01/1_rfc_dest_631040.png

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

/wp-content/uploads/2015/01/2_trfc_generation_631041.png

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).

/wp-content/uploads/2015/01/3_call_failed_631042.png

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.

/wp-content/uploads/2015/01/4_trfc_debug_631043.png


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

To report this post you need to login first.

6 Comments

You must be Logged on to comment or reply to a post.

  1. Iñaki Vila

    Hi Michal,

    Definitely a really useful blog. Finally, we have a way to monitor the RFC. As per my understanding it can be used with PI scenarios with RFC receiver, isn’t it?.

    Regards.

    (0) 
    1. Michal Krawczyk Post author

      hi Iñaki Vila,

      You got me there… I don’t know to be honest 🙂

      Will try to investigate and come back once I have the answer but a perfectly valid question,

      Thank you,

      Regards,

      Michal Krawczyk

      (0) 
  2. Raja Shekar Shanmukh Srinivasa Mantha

    Hi Michal,

    Is there Some configuration missing in this article after step 2 and step 3?

    Please suggest on below.

    After the Structure and Playback FM are generated. How do we trigger the AIF ?

    What did you mean by Execute the report/transaction on the calling SAP backend system which will send the data to the destination SAP backend system?


    Is that the  /AIF/TRANSFER? or any custom report?

    Could you please give detail idea on the RFC monitoring steps after the Structure generation.?



    Thanks in Advance.

    Shanmukh Srinivas

    (0) 
  3. Florian Barth

    Hi Michal,

    what kind of errors are recognized by AIF. Only Dumps or can we tell it to also monitor “business errors” in case of wrong/ inconsistent data?

    Regards,

    Florian Barth

    (0) 

Leave a Reply