The Inbound mapping method is provided with:
BOP DO
A set of BOP DOs processed by previous mapping specialists
The entity data (ER_ENTITY or ER_ENTITYSET or ER_DATA). The entity data can be partially filled by previous mapping specialists.
Operation specific parameters
To implement inbound mapping interface method /IWBEP/IF_MGW_BOP_MAP_UPDATE~MAP_INBOUND for Update operation, proceed as follows:
The input parameter IO_DATA_PROVIDER (of type /IWBEP/IF_MGW_ENTRY_PROVIDER) contains the input request. IT_KEY_TAB contains the keys of an entity.
Read the request data into a local variable.
Create the BOP request using the input request.
Set the BOP DO request.
Sample Code
DATA: lo_dataobject TYPE REF TO /iwbep/cl_mgw_bop_sfl_bkcr_do, ls_flightdata TYPE /iwbep/cl_mgw_edp_sfl_model_bs=>ts_flight, ls_book_data TYPE /iwbep/cl_mgw_edp_sfl_model_bs=>ts_booking, lt_booking TYPE STANDARD TABLE OF /iwbep/cl_mgw_edp_sfl_model_bs=>ts_booking, ls_request TYPE /iwbep/cl_mgw_bop_sfl_bkcr=>_params_request. " All BOP classes have the types _params_request and _params_response. " Use them to access the parameters for your backend call. TRY. io_data_provider->read_entry_data( IMPORTING es_data = ls_flightdata ). CATCH /iwbep/cx_mgw_tech_exception. ENDTRY. MOVE ls_flightdata-bookings TO lt_booking. READ TABLE lt_booking INDEX 1 INTO ls_book_data. IF NOT ls_book_data IS INITIAL. MOVE-CORRESPONDING ls_book_data TO ls_request-booking_data. * ls_request-booking_data-customerid = '00000003'. * ls_request-booking_data-agencynum = '00000002'. lo_bop_do->set_request( ls_request ). ELSE. ev_process_code = /iwbep/if_mgw_edp_map=>cs_process_code-stop_processing. ENDIF. |
To implement outbound mapping interface method /IWBEP/IF_MGW_BOP_MAP_UPDATE~MAP_OUTBOUND for Update operation, proceed as follows:
Get the BOP response.
Check if there are any errors from the response. If yes, add the messages to the Message Counter.
For Execute Action operation, form the response data.
Continue with Error Handling in Mapping Specialists
Back to Developing Content on SAP Gateway OData Channel Using IWBEP