Show TOC

Implementing /IWBEP/IF_MGW_EDP_MAP_UPDATELocate this document in the navigation structure

Implementing /IWBEP/IF_MGW_EDP_MAP_UPDATE for Update — Inbound Mapping

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:

  1. 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.

  2. Read the request data into a local variable.

  3. Create the BOP request using the input request.

  4. Set the BOP DO request.

Sample Code

       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.

      io_data_provider->read_entry_data( IMPORTING es_data = ls_flightdata ).
    CATCH /iwbep/cx_mgw_tech_exception.

  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 ).
    ev_process_code = /iwbep/if_mgw_edp_map=>cs_process_code-stop_processing.
Implementing /IWBEP/IF_MGW_EDP_MAP_UPDATE for Update — Outbound Mapping

To implement outbound mapping interface method /IWBEP/IF_MGW_BOP_MAP_UPDATE~MAP_OUTBOUND for Update operation, proceed as follows:

  1. Get the BOP response.

  2. Check if there are any errors from the response. If yes, add the messages to the Message Counter.

  3. 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