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_class_name type ABAP_ABSTYPENAME.
CALL FUNCTION ‘SAUNIT_GET_CLASS_METHODS’
name = lv_class_name
methods = lt_abap_methdescr
internal_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
LOOP AT lt_abap_methdescr INTO ls_abap_methdescr.
IF ls_abap_methdescr-name = ‘EXECUTE_ASYNCHRONOUS’.
lv_check_changed = ‘X’.
IF lv_check_changed <> ‘X’.
*use the new naming
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.