Thursday, April 25, 2013

How to Enhance Standard Datasource to be used in BI System


By Sarika Kotian, TCS
Prerequisites for using this material:
  •  ABAP Knowledge
  • Basic familiarity with BI terminologies  
Introduction:
Business intelligence (BI) mainly refers to reporting technique used in identifying, extracting and analyzing business data in SAP. It supports decision-making in business.
A DataSource is a set of fields, i.e. Structure that provide the data for a business unit for data transfer into BI.
Enhancement:
Execute Transaction ‘RSA6’.
    
Here, you find the list of Datasource. Navigate further by selecting the respective Datasource to get a detailed view of the same. 
  
Here, in the detailed view, Extract Structure is the standard structure to be Enhanced.
Navigate further by selecting the Structure.
Append a ‘ZZ’ Structure through Menu->Goto->Append Structure.
List the required fields in the Append Structure.
Once the fields are appended, execute Transaction ‘RSA6’ and click on change mode and select the respective Datasource, and navigate to the detailed view, all the additional fields will appear in the field list. By Default ‘Hide’ Attribute will be selected, deselect the same for the fields to appear in the report.
Populating the Data: 
Once the fields have been added, data needs to be populated. Data can be populated using Enhancement technique ‘BADI’ using standard BADI – ‘RSU5_SAPI_BADI’.  
This standard BADI needs to be implemented using Transaction Code ‘ SE19’.

Enter the ‘Z’ implementation name.  
Mention Short text for the implementation and click on ‘Interface’ tab.  
Navigate further by selecting ‘DATA_TRANSFORM’ Method and enter the logic for populating the data. 
Method ‘DATA_TRANSFORM’ has 2 essential Parameters:  
·         I_DATASOURCE – Can be used for conditional branching using ‘CASE’ wherein only for the respective data source the logic will be executed.  
·         C_T_DATA – Is a table, which contains data provided by the standard program for the standard fields of the respective structure. This Content can be further used for fetching, mapping and populating newly added fields.  
Once the data has been populated, the same could be tested using Transaction Code ‘RSA3’.  
Enter the Datasource name and Click on ‘Extraction’.
Select ‘ALV Grid’ to view the contents.

No comments:

Post a Comment