INBOUND SAP 作为服务提供方,获取请求数据的MESSAGE ID如下所示:
DATA: lo_protocol TYPE REF TO if_wsprotocol_message_id,
lo_server_context TYPE REF TO if_ws_server_context.
TRY.
lo_server_context = cl_proxy_access=>get_server_context( ).
lo_protocol ?= lo_server_context->get_protocol( if_wsprotocol=>message_id ).
DATA(lv_pi_msgid_out_raw) = lo_protocol->get_message_id( ).
CATCH cx_ai_system_fault.
ENDTRY.
上述代码在接口功能处理程序之前
[接口功能处理代码]