Quantcast
Channel: SCN : Document List - Business Content and Extractors
Viewing all articles
Browse latest Browse all 52

Easy steps to perform the DataSource Enhancement for the standard FI_GL/AR/AP Extractors/DataSource using ABAP Code through Business Transaction Event (BTE). Part -2

$
0
0

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.

 

p1.jpg


Select the DataSource and go inside the extract structure.

Then,

Select the include "CI_BSIS"

 

p2.jpg

 

Append the additional fields.

 

p3.jpg

 

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

 

p4.jpg

 

p5.jpg

 

Or

 

p6.jpg

 

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

 

p7.jpg

 

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

 

p8.jpg

 

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:

 

SE80.jpg

 

Copy FM.jpg

 

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

 

p9.jpg

 

Code.jpg

 

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/


Viewing all articles
Browse latest Browse all 52

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>