Delete inbound mapping method /IWFND/IF_MGW_BOP_MAP_DELETE~MAP_INBOUND is provided with:
A table with key fields of the entity to be deleted.
Navigation path
BOP DO
Table of processed BOP DOs
Table of processed backend data – Backend data is filled with data from Custom Backend Connectivity API
To implement inbound mapping interface method /IWFND/IF_MGW_BOP_MAP_DELETE~MAP_INBOUND for delete, proceed as follows:
Loop at IT_KEY_TAB to create the BOP DO request structure.
DATA: ls_key_tab TYPE LINE OF /iwcor/if_odata_types=>nvp_t. DATA: lo_bop_do TYPE REF TO /iwfnd/cl_mgw_bop_book_del_do. DATA: ls_request TYPE /iwfnd/cl_mgw_bop_book_del=>_params_request. LOOP AT it_key_tab INTO ls_key_tab. CASE ls_key_tab-name. WHEN 'airlineid'. ls_request-airlinecarrier = ls_key_tab-value. WHEN 'connectid'. ls_request-connectionnumber = ls_key_tab-value. WHEN 'flightdate'. ls_request-dateofflight = ls_key_tab-value. WHEN 'bookingnumber'. ls_request-bookingnumber = ls_key_tab-value. ENDCASE. ENDLOOP. |
Set the BOP DO request.
lo_bop_do ?= io_bop_do. lo_bop_do->set_request( ls_request ). |
Delete outbound mapping method /IWFND/IF_MGW_BOP_MAP_DELETE~MAP_OUTBOUND is provided with:
A table with key fields of the entity to be deleted.
Navigation path
BOP DO
Table of processed BOP DOs
Table of processed backend data – Backend data is filled with data from Custom Backend Connectivity API
To implement outbound mapping interface method /IWFND/IF_MGW_BOP_MAP_DELETE~MAP_OUTBOUND for delete, proceed as follows:
Get the BOP DO response and check if there are any backend call errors. In case of backend errors, copy the backend error message and add it to the message container. Set the process code to STOP_PROCESSING.
In case of successful backend call, do nothing.
DATA: lo_bop_do TYPE REF TO /iwfnd/cl_mgw_bop_book_del_do. DATA: ls_response TYPE /iwfnd/cl_mgw_bop_book_del=>_params_response. DATA: ls_return TYPE /iwfnd/cl_mgw_bop_book_del=>_params_response-return. DATA lo_exp TYPE REF TO /iwfnd/cx_mgw_busi_exception. lo_bop_do ?= io_bop_do. lo_bop_do->get_response( IMPORTING es_response = ls_response ). IF ls_response-return-type EQ 'E'. CREATE OBJECT lo_exp EXPORTING textid = /iwfnd/cx_mgw_busi_exception=>business_error message = ls_response-return-message. /iwfnd/if_mgw_bop_map~mo_request_context->get_message_container( )->add_message_from_exception( io_exception = lo_exp iv_is_leading_message = abap_true iv_system_alias = /iwfnd/if_mgw_bop_map~mv_system_alias iv_message_creator = 'TEST' iv_entity_type = 'booking' ). ev_process_code = /iwfnd/if_mgw_bop_map=>cs_process_code-stop_processing. ENDIF. |
Continue with Error Handling in Mapping Specialists