Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member222937
Participant

Applies to:

SAP NetWeaver Business Warehouse (formerly BI) - SAP BW 3.5 & 7.x. Versions.



Summary:

The article explains the step by step procedure for DataSource Enhancement using ABAP Code for FI_GL/AR/AP Extractors through Business Transaction Event (BTE).


Table of Contents:


1. Introduction

2. Test Scenario for adding the extra fields into the standard 0FI_GL_4 extractor

3. Describing the Test Scenario

4. Related content


Introduction:


In many BW Projects, we have seen that most of the time we need to enhance the standard FI_GL/AR/AP extractors and pull the data apart from the base/origin tables on certain Business logic/requirement. In this scenario, enhancing the 0FI_GL_4 DataSource and adding the extra fields from the EKKO, EKPO, MEBW tables.


Test Scenario:

Following are the simple steps to achieve the DataSource Enhancement through BTE.


Below details of extra fields.


Fields:


Vendor:                   EKKO-LIFNR                   into                ZZGR_LIFNR           (Extractor Field)

Plant in Stock:        EKKO-RESWK                into                ZZGR_RESWK         (Extractor Field)

Receiving Plant:     EKPO-WERKS                into                ZZGR_WERKS         (Extractor Field)

PO Quantity:          EKPO-MENGE               into                ZZGR_MENGE        (Extractor Field)

PO Price:                 EKPO-NETPR                 into                ZZGR_NETPR          (Extractor Field)

Standard Price:      MBEW-STPRS               into                ZZGR_STPRS           (Extractor Field)    


Now Go to T-Code: RSA6 and select the DataSource.


Select the DataSource and go inside the extract structure.

Then,

Select the include "CI_BSIS"

Append the additional fields.

Note: Don't forget to specify the reference table (DTFIGL_4/CI_BSIS) and reference fields for Quantity, Currency and Unit field.

Or

Again, Go to: RSA6 and select the DataSource in edit mode.

Unchecked the additional fields, which is newly added in the structure.

Save & Activate the DataSource.


Now Coding Part to populate the data through BTE.

Go to T-Code: SE80 and copy the standard Function Module (Template) "SAMPLE_PROCESS_00005021" from the Function Group "BFFMSMPL3" with a new name for example:

Then Go to: SE37 and open the FM in edit mode ZBWFI_FILL_CI_00005021.

Write the code in Source code Tab:


"Details from EKKO:Purchasing Document Header


          SELECT  SINGLE          lifnr AS zzgr_lifnr

                                                reswk AS zzgr_reswk

          INTO  CORRESPONDING FIELDS OF <fs_dtfigl_4>

   

          FROM  ekko


          WHERE      ebeln = wa_bseg-ebeln.

"Details from EKPO:Purchasing Document Item


       SELECT  SINGLE           werks AS zzgr_werks

                                               menge AS zzgr_menge

                                               netpr AS zzgr_netpr


          INTO  CORRESPONDING FIELDS OF <fs_dtfigl_4>


          FROM  ekpo


          WHERE      ebeln = wa_bseg-ebeln

               AND      ebelp = wa_bseg-ebelp.

"Details from MBEW:Material Valuation


        SELECT  SINGLE           stprs AS zzgr_stprs


          INTO  CORRESPONDING FIELDS OF <fs_dtfigl_4>


          FROM  mbew


          WHERE      matnr = wa_bseg-matnr  "BSEG-MATNR

               AND      bwkey = wa_bseg-werks. "BSEG-WERKS

Save & Activate the FM.


And now test the DataSource in RSA3. And collect all objects into TR.

Then,

Replicate/Import the DataSource in the BW/etc. Targets  (Destination) and load the data into respectively Data Targets.

Related content:


https://scn.sap.com/

https://help.sap.com/

2 Comments
Labels in this area