Hi Team ,
For my OData, service i need to pass multiple tables as input hence I redefined the CREATE_DEEP_ENTITY() method. Till now everything is OK.
But the issue is same service should return the table as output. Here I used POST method to send the data. In order to copy the output record to ER_ENTITY I used to COPY_DATA_TO_REF.
Below is the code snippet.
---------------------------------------------------
CALL FUNCTION 'ZECC_FUNC_ORDERBOOKING_INVOICE' DESTINATION lv_destination
EXPORTING
iv_soldtoparty = iv_soldtoparty
iv_fromdate = iv_fromdate
iv_todate = iv_todate
iv_sales_org = iv_sales_org
IMPORTING
ev_msg = iv_msg
ev_flag = iv_flag
TABLES
sales_org = lt_orderbooktosalesorg " Input table
sales_office = lt_orderbooktosalesoffice " Input table
sales_grp = lt_orderbooktosalesgroup " Input table
dist_channel = lt_orderbooktodistchannel " Input table
material_grp1 = lt_orderbooktomatgroup " Input table
et_order_booking = lt_orderbooktoetorderbook " Output Table which has to shown in the output
EXCEPTIONS
system_failure = 1000
OTHERS = 1002.
ls_expand-orderbooktoetorderbook[] = lt_orderbooktoetorderbook[].
copy_data_to_ref( EXPORTING is_data = ls_expand
CHANGING cr_data = er_deep_entity ).
Regards,
Vishal.