cancel
Showing results for 
Search instead for 
Did you mean: 

PROXY-sending: How can I get the Message-ID in the program?

Former Member
0 Kudos

Hello,

how can i get the Message-ID after calling the execute_asynchronous method.

Thanx in advance!

Edited by: Sebastian Becker on Oct 8, 2008 12:13 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

prateek
Active Contributor
0 Kudos
Former Member
0 Kudos

Sorry but that did not work, because it is for synchronous sending. I solved it that way:

TRY.

CREATE OBJECT lo_proxy.

lo_async_messaging ?= lo_proxy->get_protocol( if_wsprotocol=>async_messaging ).

*Set Qos EOIO defining the name of the queue

IF NOT lv_queuename IS INITIAL.

lo_async_messaging->set_serialization_context( lv_queuename ).

ENDIF.

*-Execute Proxy

CALL METHOD lo_proxy->execute_asynchronous

EXPORTING

output = ls_input.

  • get MSG-ID

lo_msg_id_protocol ?=

lo_proxy->get_protocol( if_wsprotocol=>message_id ).

l_msg_id = lo_msg_id_protocol->get_message_id( ).

WRITE:/ 'Message-ID', ' ' , l_msg_id , 'Material' , i_matnr.

ULINE.

COMMIT WORK.

CATCH cx_ai_system_fault INTO lo_fault.

WRITE 😕 lo_fault->errortext.

lv_msgtxt = lo_fault->errortext.

ENDTRY.