/IWBEP/IF_MGW_APPL_SRV_RUNTIME
CHANGESET_PROCESS
/IWBEP/IF_MGW_APPL_SRV_RUNTIME~# CHANGESET_PROCESS
DATA:
lv_entity_type TYPE string,
ls_changeset_request TYPE /iwbep/if_mgw_appl_types=>ty_s_changeset_request,
lo_request_context TYPE REF TO /iwbep/if_mgw_req_entity_c,
ls_changeset_response TYPE /iwbep/if_mgw_appl_types=>ty_s_changeset_response,
ls_afvc_modify TYPE zcl_zps_jmyh_mpc=>ts_afvc,
ls_eban TYPE zcl_zps_jmyh_mpc=>ts_eban,
lt_eban_modify TYPE zcl_zps_jmyh_mpc=>tt_eban,
ls_esll TYPE zcl_zps_jmyh_mpc=>ts_esll,
lt_esll_modify TYPE zcl_zps_jmyh_mpc=>tt_esll,
cons_tesll_temp TYPE zcl_zps_jmyh_mpc=>tt_esll.
LOOP AT it_changeset_request INTO ls_changeset_request.
lo_request_context ?= ls_changeset_request-request_context.
lv_entity_type = lo_request_context->get_entity_type_name( ).
"操作类型、CRUD"
CASE ls_changeset_request-operation_type.
WHEN /iwbep/if_mgw_appl_types=>gcs_operation_type-create_entity
CASE lv_entity_type.
WHEN 'afvc'.
ls_changeset_request-entry_provider->read_entry_data( IMPORTING es_data = ls_afvc_modify ).
IF ls_afvc_modify-matkl IS INITIAL.
ls_afvc_modify-matkl = 'DC2001012'.
ENDIF.
copy_data_to_ref( EXPORTING is_data = ls_afvc_modify CHANGING cr_data = ls_changeset_response-entity_data ).
ENDCASE.
ENDCASE.
ls_changeset_response-operation_no = ls_changeset_request-operation_no.
INSERT ls_changeset_response INTO TABLE ct_changeset_response.
ENDLOOP.
常量
操作类型
/iwbep/if_mgw_appl_types=>gcs_operation_type
CONSTANTS:
BEGIN OF gcs_operation_type,
create_deep_entity TYPE /iwbep/mgw_operation_type VALUE 'CD', "#EC NOTEXT
create_entity TYPE /iwbep/mgw_operation_type VALUE 'CE', "#EC NOTEXT
create_stream TYPE /iwbep/mgw_operation_type VALUE 'CM', "#EC NOTEXT
delete_entity TYPE /iwbep/mgw_operation_type VALUE 'DE', "#EC NOTEXT
delete_stream TYPE /iwbep/mgw_operation_type VALUE 'DM', "#EC NOTEXT
execute_action TYPE /iwbep/mgw_operation_type VALUE 'EA', "#EC NOTEXT
expand_entity TYPE /iwbep/mgw_operation_type VALUE 'XE', "#EC NOTEXT
expand_entityset TYPE /iwbep/mgw_operation_type VALUE 'XS', "#EC NOTEXT
get_entity TYPE /iwbep/mgw_operation_type VALUE 'GE', "#EC NOTEXT
get_entityset TYPE /iwbep/mgw_operation_type VALUE 'GS', "#EC NOTEXT
get_entityset_delta TYPE /iwbep/mgw_operation_type VALUE 'GD', "#EC NOTEXT
get_stream TYPE /iwbep/mgw_operation_type VALUE 'GM', "#EC NOTEXT
patch_entity TYPE /iwbep/mgw_operation_type VALUE 'PE', "#EC NOTEXT
update_entity TYPE /iwbep/mgw_operation_type VALUE 'UE', "#EC NOTEXT
update_stream TYPE /iwbep/mgw_operation_type VALUE 'UM', "#EC NOTEXT
changeset_begin TYPE /iwbep/mgw_operation_type VALUE 'HB', "#EC NOTEXT
changeset_end TYPE /iwbep/mgw_operation_type VALUE 'HE', "#EC NOTEXT
changeset_process TYPE /iwbep/mgw_operation_type VALUE 'HP', "#EC NOTEXT
get_is_cond_impl TYPE /iwbep/mgw_operation_type VALUE 'IC', "#EC NOTEXT
END OF gcs_operation_type .
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Hblog!