Skip to Content
0
Former Member
Feb 23, 2007 at 05:45 PM

ABAP Client proxies: extract data from the response and update Z table

339 Views

Hi All,

I have following ABAP code for client proxies:

We have DT_Req, MT_Req, DT_Res, MT_Res and MI_Sync_OB (O/p Message: MT_Req, I/P message:MT_Res)

Proxy Objects generated:

ZCO_MI_SYNC_OB

ZMT_REQ

ZDT_REQ

ZDT_REQ_RECORDS

ZDT_REQ_RECORDS_TAB

ZMT_RES

ZDT_RES

ZDT_RES_RECORDS

ZDT_RES_RECORDS_TAB

ABAP Code:

REPORT ZTEST_DELETE.

DATA:

lo_history TYPE REF TO ZCO_MI_SYNC_OB,

lo_sys_exception TYPE REF TO cx_ai_system_fault,

  • Structures to set and get message content

lv_history_req_mt TYPE ZMT_REQ OCCURS 0 WITH HEADER LINE,

lv_history_res_mt TYPE ZMT_RES,

lv_history_req_rec TYPE ZDT_REQ_RECORDS,

lv_history_res_rec TYPE ZDT_RES_RECORDS.

lv_history_req_rec-VLAUE = SY-DATUM.

APPEND lv_history_req_rec TO lv_history_req_mt-MT_REQ-RECORDS.

CREATE OBJECT lo_history.

TRY.

  • Call outbound Proxy

CALL METHOD lo_history->execute_synchronous

EXPORTING

output = lv_history_req_mt

IMPORTING

<b>input = lv_history_res_mt.</b>

  • Error handling

CATCH cx_ai_system_fault INTO lo_sys_exception.

SKIP 2.

WRITE:/ lo_sys_exception->errortext.

RETURN.

ENDTRY.

<b>Now I have my response data in the internable "lv_history_res_mt-MT_REQ-RECORDS" which is deep structure.

How do I extract data records (multiple) from the above internal table and update to Z table??</b>

Thanx

Navin