Show TOC

Procedure documentationImplementing a Simple Consumer Application Locate this document in the navigation structure

Procedure

  1. Use the ABAP Editor (transaction code SE38) to create a simple application.

  2. In the program, do the following:

    • Instantiate the generated proxy class.

    • Supply a logical port name if you wish to use a logical port other than the default.

    • Execute an instance method to call the enterprise service operation.

Example

A consumer proxy can be accessed using the instantiation of the proxy class, as shown in the following example:

Syntax Syntax

  1. DATA:
  2.   my_interface TYPE REF TO zmy_co_synchronous_outbound_inter,
  3.   my_request TYPE zmy_request_message_type,
  4.   my_response TYPE zmy_response_message_type.
  5. *   create instance
  6.     CREATE OBJECT my_interface.
  7. *   fill request data
  8.     my_request-request_message_type-simple = 'A simple String'.
  9. *   call outbound
  10. TRY.
  11.     CALL METHOD my_interface->execute_synchronous
  12.        EXPORTING
  13.          output = my_request
  14.        IMPORTING
  15.          input  = my_response.
  16.     CATCH cx_ai_system_fault.
  17.     CATCH cx_ai_application_fault.
  18. ENDTRY.
End of the code.