(Glue-2008) Q: How can we use BW Data sources as a base for extraction?

Data sources definition originates in ERP system and is exposed via different frameworks for consumers. Older technology is called SAPI and allows only BW to fetch the data from ERP and newer one is called ODP where multiple consumers are allowed (e.g. SAP BW, SAP DS, HANA SDI).

Datavard recommends using ABAP type of extractor where custom logic can be implemented which can read any available SAP code to get this data to internal table which Glue will push to Hadoop. Documentation is available online.

Please note that below implementations are using standard SAP functionality which is not released for end users. Responsibility for the code and operation is with the customer.

Example of SAPI implementation for the 2LIS_13_VDITM extractor.

Note: Full load and delta load doesn't need BW but for the delta init it needs to be executed from existing BW system to set it up correctly.


*  by default we run full extraction via following FM

  mb_fm_name 'MCEX_BW_LO_API'.


* in case of delta request, call common delta extractor

  CASE ms_sel_criteria-updmode.

    WHEN sbiwa_c_updmode_delta.

      mb_fm_name rsaot_c_extractor-gendelta.

    WHEN sbiwa_c_updmode_repeat.

      mb_fm_name rsaot_c_extractor-gendelta.

    WHEN    sbiwa_c_updmode_deltainit

         OR srsc_c_updmode_initsimu.

      mb_fm_name rsaot_c_extractor-gendeltainit.

  ENDCASE.



************************************************************************

* Initialization of application API

************************************************************************

  CALL FUNCTION mb_fm_name

    EXPORTING

      i_requnr                     ms_sel_criteria-requnr

      i_isource                    ms_sel_criteria-iobject

      i_maxsize                    ms_sel_criteria-maxsize

      i_initflag                   sbiwa_c_flag_on

      i_updmode                    ms_sel_criteria-updmode

      i_rlogsys                    ms_sel_criteria-rcvprn

      i_read_only                  ms_sel_criteria-readonly

    TABLES

      i_t_select                   mt_select_pass

      i_t_fields                   mt_fields_pass

    EXCEPTIONS

      no_more_data                 4

      error_passed_to_mess_handler 8.


* propagate the rest of the errors to upper layers

  CASE sy-subrc.

    WHEN 0.

      me->mb_has_data 'X'.

  ENDCASE.


Similar can be achieved with ODP framework utilizing test repot RODPS_REPL_TEST for ODP extraction.