Skip to Content

When working with asynchronous client ABAP proxies (executed from SAP Application systems like ECC) we always used to use the same method to execute the call to SAP PI/XI system – Execute_Asynchronous. By calling this method a message got deliveried to SAP PI/XI from were we could send it to the receiver system.

ABAP proxies were created from SAP PI/XI’s Message Interfaces designed in the Interface Repository and with PI/XI (7.0/3.0) Message Interfaces could only contain one real message (method). With the introduction of SAP Process Integration 7.1 this got changed and there are no Message Interfaces anymore. Instead of that we have a new object Service Interface which allow specifying several methods (real messages) inside itself. Now if inside the sending SAP Application system we would still use the same, one method Execute_Asynchronous the system wouldn’t know which message should be deliveried to the SAP PI/XI. That’s why the approach of ABAP Proxy execution got completely changed on every SAP Application system (like ECC) with the introdution of SAP_BASIS SP14. Now the method that you need to call from to send an ABAP Proxy message has exactly the same name as a method inside the Service Interface objects in Enterprise Service Repository (ESR is a successor of Integration Repository – IR) like shown in the picture below:

When this is clear the next question which most of would ask would be:
what about my old programs that use the old method?

Don’t worry the old programs will continue to work as long as they don’t use proxies class names
dynamically and Execute_Asynchronous is the only method that send them. Is there any easy way to eliminate that drawback? There are a few ways but one of them would be to check if the ABAP Proxy class has a method Execute_Asynchronous and if not call the proxy with the new method name. Below you can find a short code sample that checks the method names and if the EXECUTE_ASYNCHRONOUS method is not found it can be replaced with anything else.

  DATA: lt_abap_methdescr type abap_methdescr_tab.
  DATA: ls_abap_methdescr LIKE LINE OF lt_abap_methdescr_tab.
  DATA: lv_check_changed.
  DATA: lv_class_name type ABAP_ABSTYPENAME.

  CALL FUNCTION ‘SAUNIT_GET_CLASS_METHODS’
    EXPORTING
      name           = lv_class_name
    IMPORTING
      methods        = lt_abap_methdescr
    EXCEPTIONS
      internal_error = 1
      OTHERS         = 2.
  IF sy-subrc <> 0.

  ENDIF.

  LOOP AT lt_abap_methdescr INTO ls_abap_methdescr.
    IF ls_abap_methdescr-name = ‘EXECUTE_ASYNCHRONOUS’.
      lv_check_changed = ‘X’.
    ENDIF.
  ENDLOOP.

  IF lv_check_changed <> ‘X’.

*use the new naming

  ENDIF.

Note

Remember it does no matter if you use SAP PI/XI 7.1 but as long as your SAP Application system has SAP_BASIS SP14 you cannot use Execute_Asynchronous method anymore all new interfaces generated on this system will have the new methods according to the new naming convention.

In short the things to remember with the introdutions of the new conventions are:

– your old programs that work with Execute_Asynchronous method will continue to work
(unless they use class names dynamically and new classes will be generated on this SAP Application system)

– if you make any changes to the Message Interfaces (structure, etc.) and will need to remove
and recreate the ABAP Proxy class it will no longer have the old method – Execute_Asynchronous

– your new programs must be designed in the new way – so they cannot use method Execute_Asynchronous anymore

Hope this blog provided you with some more information about the new idea of ABAP Proxy methods. 

To report this post you need to login first.

5 Comments

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

  1. Former Member
    During the migration process problems have been reported for this blog. The blog content may look corrupt due to not supported HTML code on this platform. Please adjust the blog content manually before moving it to an official community.
    (0) 
  2. Former Member
    Michal,

    I posted this on the SDN Forum, but no luck.  What if we are using PI 7.0 and an ECC > SP14, but not creating a program to call the proxy.  I want to use SWF_BAM and change event linkage to the proxy.  The Binding keeps trying to use execute_asynchronous.

    Keith

    (0) 
  3. Rafael Vieira

    Hey Michal, so does that apply to XI/PI 7.0 SAP_BASIS 13 as a highest version to have Execute_Asynchronous method running?

    What if I have PI 7.0 EhP2 with SAP_BASIS 11, am I still able to run execute_asynchronous?

    Tks!

    Rafael.

    (0) 

Leave a Reply