ABAP Outbound Proxy: Set EOIO Queue

In order to use EOIO (Exactly-Once-In-Order), you have to pass the Queue ID to the class before calling the Outbound Proxy in your ABAP Program. It can be a static value like shown below (parameter) or a dynamic object like a document number:

 

PARAMETERS: p_queue TYPE sxmsqidapp.

DATA: l_proxy TYPE REF TO z…,
async_messaging TYPE REF TO if_wsprotocol_async_messaging.

CREATE OBJECT l_proxy.

async_messaging ?= l_proxy->get_protocol( if_wsprotocol=>async_messaging ).
async_messaging->set_serialization_context( p_queue ).

ABAP Outbound Proxy: Request Acknowledgements

To request System- or Application-Acknowledgements, you have to request them before calling the Outbound Proxy in your ABAP Program:

DATA: l_proxy TYPE REF TO z…,
acknowledgment_request_details TYPE PRX_ACK_REQUEST_DETAILS,
async_messaging TYPE REF TO if_wsprotocol_async_messaging.

CREATE OBJECT l_proxy.

async_messaging ?= l_proxy->get_protocol( if_wsprotocol=>async_messaging ).

acknowledgment_request_details-application_ok = abap_true.
acknowledgment_request_details-application_error = abap_true.

acknowledgment_request_details-system_ok = abap_true.
acknowledgment_request_details-system_error = abap_true.

async_messaging->set_acknowledgment_requested( details = acknowledgment_request_details ).