IF line_exists( it_filter_select_options[ property = 'Land1' ] ).
DATA(lr_range) = it_filter_select_options[ property = 'Land1' ]-select_options.
ENDIF.
SELECT a~taxtype,
b~text
FROM tfktaxnumtype_c AS a
LEFT OUTER JOIN tfktaxnumtype_t AS b
ON a~taxtype EQ b~taxtype
AND b~spras EQ @sy-langu
INTO CORRESPONDING FIELDS OF TABLE @et_entityset
WHERE a~taxtype IN @lr_range.
types:
BEGIN OF ty_s_supplier .
INCLUDE TYPE zcl***mpc=>ts_vendorcreate.
TYPES: tax TYPE STANDARD TABLE OF zcl***mpc=>ts_tax WITH KEY taxtype.
TYPES: attachments_v TYPE STANDARD TABLE OF zcl***mpc=>ts_attachments_v WITH KEY usmd_title,
END OF ty_s_supplier .
types:
BEGIN OF ty_s_l4_tree.
INCLUDE TYPE zcl_zmdg_mm_creq_prodh_mpc=>ts_l4_tree.
TYPES: l4_l5 TYPE STANDARD TABLE OF zcl_zmdg_mm_creq_prodh_mpc=>ts_l5_tree WITH DEFAULT KEY,
END OF ty_s_l4_tree .
types:
BEGIN OF ty_s_l3_tree.
INCLUDE TYPE zcl_zmdg_mm_creq_prodh_mpc=>ts_l3_tree.
TYPES: l3_l4 TYPE STANDARD TABLE OF ty_s_l4_tree WITH DEFAULT KEY,
END OF ty_s_l3_tree .
types:
BEGIN OF ty_s_l2_tree.
INCLUDE TYPE zcl_zmdg_mm_creq_prodh_mpc=>ts_l2_tree.
TYPES: l2_l3 TYPE STANDARD TABLE OF ty_s_l3_tree WITH DEFAULT KEY,
END OF ty_s_l2_tree .
types:
BEGIN OF ty_s_tree.
INCLUDE TYPE zcl_zmdg_mm_creq_prodh_mpc=>ts_l1_tree.
TYPES: l1_l2 TYPE STANDARD TABLE OF ty_s_l2_tree WITH DEFAULT KEY,
END OF ty_s_tree .
METHOD /iwbep/if_mgw_appl_srv_runtime~changeset_begin.
cv_defer_mode = abap_true.
ENDMETHOD.
METHOD /iwbep/if_mgw_appl_srv_runtime~changeset_process.
LOOP AT it_changeset_request INTO DATA(ls_request) WHERE operation_type = 'CE'.
lo_create_context ?= ls_request-request_context.
lv_entity_type = lo_create_context->get_entity_type_name( ).
IF lv_entity_type = 'CREATE_PRODH'.
ls_request-entry_provider->read_entry_data( IMPORTING es_data = ls_data ).
IF ls_data IS NOT INITIAL.
*
Required logic
*
copy_data_to_ref(
EXPORTING
is_data = ls_data
CHANGING
cr_data = ls_changeset_response-entity_data ).
ls_changeset_response-operation_no = ls_request-operation_no.
INSERT ls_changeset_response INTO TABLE ct_changeset_response.
ENDIF.
ELSE.
* entity alredy exists - $batch will be rolled back
ls_message-msgty = 'E'.
ls_message-msgid = 'ZMDG_MM_LEAN'.
ls_message-msgno = '001'.
ls_message-msgv1 = ls_data-prodh.
me->/iwbep/if_mgw_conv_srv_runtime~get_message_container( )->add_message(
iv_msg_type = ls_message-msgty
iv_msg_id = ls_message-msgid
iv_msg_number = ls_message-msgno
iv_msg_v1 = ls_message-msgv1
iv_msg_v2 = ls_message-msgv2
iv_msg_v3 = ls_message-msgv3
iv_msg_v4 = ls_message-msgv4
).
RAISE EXCEPTION TYPE /iwbep/cx_mgw_busi_exception
EXPORTING
message_container = me->/iwbep/if_mgw_conv_srv_runtime~get_message_container( ).
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
ENDMETHOD.
--batch
Content-Type: multipart/mixed; boundary=changeset1
--changeset1
Content-Type: application/http
Content-Transfer-Encoding: binary
POST CREATE_PRODHSet HTTP/1.1
Content-Type: application/json
{
"Field1" : "30002",
"Field2" : "Value",
}
--changeset1--
--batch
Content-Type: multipart/mixed; boundary=changeset2
--changeset2
Content-Type: application/http
Content-Transfer-Encoding: binary
POST CREATE_PRODHSet HTTP/1.1
Content-Type: application/json
{
"Field1" : "30004",
"Field2" : "Value",
}
--changeset2--
--batch--
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
2 | |
2 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 |