-
-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathDeepInsert
More file actions
25 lines (20 loc) · 968 Bytes
/
Copy pathDeepInsert
File metadata and controls
25 lines (20 loc) · 968 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
METHOD /iwbep/if_mgw_appl_srv_runtime~create_deep_entity.
* Type declaration for header and navigation items
TYPES: BEGIN OF lty_s_workorder.
INCLUDE TYPE zcl_zworkorder_mpc=>ts_workorderdetail.
TYPES: components TYPE STANDARD TABLE OF zcl_zworkorder_mpc=>ts_component WITH DEFAULT KEY,
operations TYPE STANDARD TABLE OF zcl_zworkorder_mpc=>ts_operation WITH DEFAULT KEY.
TYPES: END OF lty_s_workorder.
DATA: ls_workorder TYPE lty_s_workorder.
* Validate whether the current request including the inline SOItem data matches
* Upon match, access data from IO_DATA_PROVIDER
IF io_expand->compare_to_tech_names('SALESAREAS') = /iwbep/if_mgw_odata_expand=>gcs_compare_result-match_equals.
io_data_provider->read_entry_data( IMPORTING es_data = ls_workorder ).
ENDIF.
* Send back
copy_data_to_ref(
EXPORTING
is_data = ls_payload
CHANGING
cr_data = er_deep_entity ).
ENDMETHOD.