Professional Documents
Culture Documents
**TRY.
*CALL METHOD SUPER->/IWBEP/IF_MGW_APPL_SRV_RUNTIME~GET_EXPANDED_ENTITYSET
** EXPORTING
** IV_ENTITY_NAME =
** IV_ENTITY_SET_NAME =
** IV_SOURCE_NAME =
** IT_FILTER_SELECT_OPTIONS =
** IT_ORDER =
** IS_PAGING =
** IT_NAVIGATION_PATH =
** IT_KEY_TAB =
** IV_FILTER_STRING =
** IV_SEARCH_STRING =
** IO_EXPAND =
** IO_TECH_REQUEST_CONTEXT =
** IMPORTING
** ER_ENTITYSET =
** ET_EXPANDED_CLAUSES =
** ET_EXPANDED_TECH_CLAUSES =
** ES_RESPONSE_CONTEXT =
* .
** CATCH /IWBEP/CX_MGW_BUSI_EXCEPTION .
** CATCH /IWBEP/CX_MGW_TECH_EXCEPTION .
**ENDTRY.
copy_data_to_ref(
EXPORTING
is_data = it_expand
CHANGING
cr_data = er_entityset ).
ENDMETHOD.
method ZET_CUSTOMER_REQ_GET_ENTITYSET.
**TRY.
*CALL METHOD SUPER->ZET_CUSTOMER_REQ_GET_ENTITYSET
* EXPORTING
* IV_ENTITY_NAME =
* IV_ENTITY_SET_NAME =
* IV_SOURCE_NAME =
* IT_FILTER_SELECT_OPTIONS =
* IS_PAGING =
* IT_KEY_TAB =
* IT_NAVIGATION_PATH =
* IT_ORDER =
* IV_FILTER_STRING =
* IV_SEARCH_STRING =
** IO_TECH_REQUEST_CONTEXT =
** IMPORTING
** ET_ENTITYSET =
** ES_RESPONSE_CONTEXT =
* .
** CATCH /IWBEP/CX_MGW_BUSI_EXCEPTION .
** CATCH /IWBEP/CX_MGW_TECH_EXCEPTION .
**ENDTRY.
DATA : ES_ENTITY TYPE ZCL_ZOS_ORDER_02_MPC=>Ts_ZET_CUSTOMER_REQ.
Es_ENTITY-REQ_NAME = ES_ENTITY-REQ_NAME.
Es_ENTITY-REQ_VALUE = ES_ENTITY-REQ_VALUE.
endmethod.
METHOD zet_get_next_del_get_entityset.
**TRY.
*CALL METHOD SUPER->ZET_GET_NEXT_DEL_GET_ENTITYSET
* EXPORTING
* IV_ENTITY_NAME =
* IV_ENTITY_SET_NAME =
* IV_SOURCE_NAME =
* IT_FILTER_SELECT_OPTIONS =
* IS_PAGING =
* IT_KEY_TAB =
* IT_NAVIGATION_PATH =
* IT_ORDER =
* IV_FILTER_STRING =
* IV_SEARCH_STRING =
** IO_TECH_REQUEST_CONTEXT =
** IMPORTING
** ET_ENTITYSET =
** ES_RESPONSE_CONTEXT =
* .
** CATCH /IWBEP/CX_MGW_BUSI_EXCEPTION .
** CATCH /IWBEP/CX_MGW_TECH_EXCEPTION .
**ENDTRY.
DATA : lv_shipto_number TYPE char10,
lv_delivery_date TYPE d,
lv_var TYPE char50,
it_delivery_schedule TYPE zt_sd_delv_sch,
ls_filter TYPE /iwbep/s_mgw_select_option,
ls_select_options TYPE /iwbep/s_cod_select_option.
ENDLOOP.
ENDIF.
READ TABLE it_filter_select_options
INTO ls_filter
WITH KEY property = 'IDeliveryDate'.
IF sy-subrc = 0.
LOOP AT ls_filter-select_options INTO ls_select_options.
lv_delivery_date = ls_select_options-low.
ENDLOOP.
ENDIF.
IF sy-subrc = 0.
MOVE-CORRESPONDING it_delivery_schedule TO et_entityset.
ENDIF.
ENDMETHOD.
METHOD /iwbep/if_mgw_appl_srv_runtime~create_deep_entity.
**TRY.
*CALL METHOD SUPER->/IWBEP/IF_MGW_APPL_SRV_RUNTIME~CREATE_DEEP_ENTITY
* EXPORTING
** IV_ENTITY_NAME =
** IV_ENTITY_SET_NAME =
** IV_SOURCE_NAME =
* IO_DATA_PROVIDER =
** IT_KEY_TAB =
** IT_NAVIGATION_PATH =
* IO_EXPAND =
** IO_TECH_REQUEST_CONTEXT =
** IMPORTING
** ER_DEEP_ENTITY =
* .
** CATCH /IWBEP/CX_MGW_BUSI_EXCEPTION .
** CATCH /IWBEP/CX_MGW_TECH_EXCEPTION .
**ENDTRY.
"Data declarations
DATA : wa_header TYPE zssd_order_header,
wa_item TYPE zssd_order_item,
it_item TYPE zt_sd_order_item,
wa_customer TYPE zssd_cust_req_order,
it_customer TYPE zt_sd_cust_req_order,
wa_message TYPE zssd_message,
it_message TYPE zt_sd_message.
DATA : lo_message TYPE REF TO /iwbep/if_message_container,
lx_bus_ex TYPE REF TO /iwbep/cx_mgw_busi_exception.
DATA : lr_deep_entity TYPE zcl_zos_order_02_mpc_ext=>ts_deep_entity.
DATA : lv_ordernum TYPE char10.
DATA : lvv_ordernum TYPE symsgv.
DATA : rfc_dest TYPE zde_ca_value.
"Reading the data
io_data_provider->read_entry_data( IMPORTING es_data = lr_deep_entity ).
wa_header-order_type = lr_deep_entity-order_type.
wa_header-sold_to = lr_deep_entity-sold_to.
wa_header-ship_to = lr_deep_entity-ship_to.
wa_header-bill_to = lr_deep_entity-bill_to.
wa_header-req_del_date = lr_deep_entity-req_del_date.
wa_header-req_del_time = lr_deep_entity-req_del_time.
wa_header-ship_to_contact_firstname = lr_deep_entity-
ship_to_contact_firstname.
wa_header-ship_to_contact_lastname = lr_deep_entity-
ship_to_contact_lastname.
wa_header-ship_to_contact_phone = lr_deep_entity-ship_to_contact_phone.
wa_header-ship_to_contact_alt_phone = lr_deep_entity-
ship_to_contact_alt_phone.
wa_header-ship_to_contact_email = lr_deep_entity-ship_to_contact_email.
wa_header-ship_to_contact_alt_email = lr_deep_entity-
ship_to_contact_alt_email.
wa_header-order_source = lr_deep_entity-order_source.
wa_header-driver_direction = lr_deep_entity-driver_direction.
wa_header-special_delivery_note = lr_deep_entity-special_delivery_note.
wa_header-alt_delivery_note = lr_deep_entity-alt_delivery_note.
wa_header-created_by = lr_deep_entity-created_by.
wa_header-rignumber = lr_deep_entity-rignumber.
wa_header-addtive_flag = lr_deep_entity-addtive_flag.
lvv_ordernum = lv_ordernum.
lr_deep_entity-c_v_order_num = lvv_ordernum.
"Handling Success and Error Messages
lo_message = mo_context->get_message_container( ).
CALL METHOD me->/iwbep/if_mgw_conv_srv_runtime~get_message_container
RECEIVING
ro_message_container = lo_message.
ELSE.
IF wa_message-mnumber = '311'.
CALL METHOD lo_message->add_message
EXPORTING
iv_msg_type = wa_message-type
iv_msg_text = wa_message-message
iv_msg_id = wa_message-id
iv_msg_number = wa_message-mnumber
iv_msg_v1 = lvv_ordernum
iv_add_to_response_header = abap_true.
ENDIF.
*
copy_data_to_ref( EXPORTING is_data = lr_deep_entity
CHANGING cr_data = er_deep_entity ).
ENDIF.
ENDLOOP.
ENDIF.
ENDMETHOD.
METHOD zet_order_header_get_entity.
**TRY.
*CALL METHOD SUPER->ZET_ORDER_HEADER_GET_ENTITY
* EXPORTING
* IV_ENTITY_NAME =
* IV_ENTITY_SET_NAME =
* IV_SOURCE_NAME =
* IT_KEY_TAB =
** IO_REQUEST_OBJECT =
** IO_TECH_REQUEST_CONTEXT =
* IT_NAVIGATION_PATH =
** IMPORTING
** ER_ENTITY =
** ES_RESPONSE_CONTEXT =
* .
** CATCH /IWBEP/CX_MGW_BUSI_EXCEPTION .
** CATCH /IWBEP/CX_MGW_TECH_EXCEPTION .
**ENDTRY.
er_entity-order_type = ls_sales_details-order_type.
er_entity-sold_to = ls_sales_details-sold_to.
er_entity-bill_to = ls_sales_details-bill_to.
er_entity-alt_delivery_note = ls_sales_details-alt_delivery_note.
er_entity-created_by = ls_sales_details-created_by.
er_entity-driver_direction = ls_sales_details-driver_direction.
er_entity-i_v_newshipto = ls_sales_details-i_v_newshipto.
er_entity-order_source = ls_sales_details-order_source.
er_entity-order_type = ls_sales_details-order_type.
er_entity-req_del_date = ls_sales_details-req_del_date.
er_entity-req_del_time = ls_sales_details-req_del_time.
er_entity-ship_to = ls_sales_details-ship_to.
er_entity-ship_to_contact_alt_email = ls_sales_details-
ship_to_contact_alt_email.
er_entity-ship_to_contact_alt_phone = ls_sales_details-
ship_to_contact_alt_phone.
er_entity-ship_to_contact_email = ls_sales_details-
ship_to_contact_email.
er_entity-ship_to_contact_firstname = ls_sales_details-
ship_to_contact_firstname.
er_entity-ship_to_contact_lastname = ls_sales_details-
ship_to_contact_firstname.
er_entity-ship_to_contact_phone = ls_sales_details-
ship_to_contact_phone.
er_entity-sold_to = ls_sales_details-sold_to.
ENDMETHOD.
METHOD zet_order_header_get_entityset.
**TRY.
*CALL METHOD SUPER->ZET_ORDER_HEADER_GET_ENTITYSET
* EXPORTING
* IV_ENTITY_NAME =
* IV_ENTITY_SET_NAME =
* IV_SOURCE_NAME =
* IT_FILTER_SELECT_OPTIONS =
* IS_PAGING =
* IT_KEY_TAB =
* IT_NAVIGATION_PATH =
* IT_ORDER =
* IV_FILTER_STRING =
* IV_SEARCH_STRING =
** IO_TECH_REQUEST_CONTEXT =
** IMPORTING
** ET_ENTITYSET =
** ES_RESPONSE_CONTEXT =
* .
** CATCH /IWBEP/CX_MGW_BUSI_EXCEPTION .
** CATCH /IWBEP/CX_MGW_TECH_EXCEPTION .
**ENDTRY.
ls_sales_details-order_type = ls_sales_details-order_type.
ls_sales_details-sold_to = ls_sales_details-sold_to.
ls_sales_details-bill_to = ls_sales_details-bill_to.
ls_sales_details-ship_to = ls_sales_details-ship_to.
ls_sales_details-addtive_flag = ls_sales_details-addtive_flag.
APPEND ls_sales_details TO et_entityset.
ENDMETHOD.
method ZET_ORDER_ITEMSE_GET_ENTITYSET.
**TRY.
*CALL METHOD SUPER->ZET_ORDER_ITEMSE_GET_ENTITYSET
* EXPORTING
* IV_ENTITY_NAME =
* IV_ENTITY_SET_NAME =
* IV_SOURCE_NAME =
* IT_FILTER_SELECT_OPTIONS =
* IS_PAGING =
* IT_KEY_TAB =
* IT_NAVIGATION_PATH =
* IT_ORDER =
* IV_FILTER_STRING =
* IV_SEARCH_STRING =
** IO_TECH_REQUEST_CONTEXT =
** IMPORTING
** ET_ENTITYSET =
** ES_RESPONSE_CONTEXT =
* .
** CATCH /IWBEP/CX_MGW_BUSI_EXCEPTION .
** CATCH /IWBEP/CX_MGW_TECH_EXCEPTION .
**ENDTRY.
Es_ENTITY-MATERIAL = ES_ENTITY-MATERIAL.
Es_ENTITY-Quantity = ES_ENTITY-Quantity.