Enhancing BI Content DataSources


After completing this lesson, you will be able to:

  • Enhance BI Content DataSources



Customers may have requirements other than those offered by BI Content DataSources. What are the possibilities of enhancing these DataSources? And how can you create customer-specific generic DataSources?

Also, if the extracted data does not meet the expectations, troubleshooting may be needed. Let's see how you can debug DataSources.

Enhancement of BI Content DataSources

There can be various reasons why BI content DataSources do not contain sufficient information. It may be that you are not working with the SAP standard in the source system and you have to modify the data extraction. Thus, the additional data must be available at the time of extraction and all required keys for reading the additional data must be part of the original data.

Application areas or information systems, such as the logistics information system (LIS) or CO-PA, allow you to use enhancements or other methods to enhance characteristics that aren't contained in the documents. These types of characteristics are also determined when a document is posted.

If the data must be enhanced at the time of SAP BW/4HANA data extraction, you must do this by enhancing the DataSource.

To enhance extraction to SAP BW/4HANA, attach extra fields to the DataSource and fill in the additional fields.

An append structure is used to add additional information to the extraction structure of the BI Content DataSource.

To enhance extraction to SAP BW/4HANA, follow these steps:

  1. Attach extra fields to the DataSource: create a customer append.
  2. Fill the additional fields with values: using user exit or BAdI.

To enhance the extraction structure, in Customizing in the source system (transaction SBIW), choose Business Information WarehousePostprocessing of DataSourcesEdit DataSources and Application Component Hierarchy.

1 – Select Enhance Extraction Structure. 2 – Enter a structure name. 3 - Maintain the remaining fields.

Selecting the DataSource: carry out the following three steps:

  1. Select Enhance Extraction Structure.
  2. Accept the proposed name, which is ZA, followed by the name of the extraction structure.
  3. Maintain the fields that you want to enhance later. All these fields must start with ZZ as a way of identifying their special purpose.
1 – Postprocess DataSources and hierarchy. 2 – Project Management of SAP Enhancements. 3 – SAP Enhancements in Enhancement Project. 4 – Change ZBW220.

From the DataSource, to fill in the new fields in the extraction structure, you must define the Function Enhancement.

Before you can use an enhancement like this, you must create a project. You can then integrate one or more enhancements into this project. For our task, SAP provides the enhancement RSAP0001. Remember that an enhancement cannot be used in two projects simultaneously.

There are four different enhancement components that can be used for enhancement RSAP0001. They contain the code for filling the extraction structure. The components are as follows:

  • EXIT_SAPLRSAP_001 Transaction data supply.

  • EXIT_SAPLRSAP_002 Master data and text supply.

  • EXIT_SAPLRSAP_003 Texts supply.

  • EXIT_SAPLRSAP_004 Hierarchy supply.

Every enhancement project has documentation, which also explains the individual parameters of the function module. To use the enhancement, it must be activated. To display documentation on the entire enhancement, choose UtilitiesDisplay Entire Docu in the project management of SAP enhancements transaction CMOD.

Project Management of SAP Enhancements: Sample Code.

The preceding figure shows an example of code for a function enhancement.

Always use a CASE statement to query the DataSource because this function exit is called with every DataSource.

This example only illustrates the procedure for determining a field value. It does not focus on performance-optimized programming. If the data volume expected is high, to optimize the runtime, buffers can be used for the material number, block reads, DB buffer mechanisms, field symbols, and so on.

Once the function exit is used, it is called with each extraction (CASE statement required). The following prerequisites and restrictions apply:

  • Key fields must be available for the enhanced content.
  • Customer exits are only specific to the append fields.
  • The maximum field length is 60 characters.
Do not change the field contents and do not add data records. Be sure that all recommended units of measure are included.

Extractors are executed as background tasks. Therefore, breakpoints don't have any effect.

The following are prerequisites for troubleshooting the source system:

  • Development authorization in the source system.
  • Troubleshooting authorization in the source system.

To troubleshoot the source system, follow these steps:

  1. Log on to the source system.
  2. Test and debug in extractor checks (RSA3).
  3. Monitor running tasks (SM50).
  4. Start extraction with the Data Transfer Process in SAP BW/4HANA.
  5. Locate the process in the monitor and start troubleshooting.
  6. Restart the Data Warehousing Workbench after code changes in the customer exit.

Since SAP ECC version 6.0, the current approach is to use a Business Add-In (BAdI) instead of user exits. The steps to create the BAdI are as follows.

Steps to Create the BAdI

  1. In SE19, choose Classic BAdI, enter the BAdI Name RSU5_SAPI_BADI, and choose Create Impl.
  2. Next to Implementation Name, enter Z<...> and choose Continue.
  3. Enter a description next to Implementation Short Text and go to the Interface tab. There are two methods: DATA_TRANSFORM and HIER_TRANSFORM.
  4. Double-click DATA_TRANSFORM and to save the BAdI Implementation, choose Yes. Choose Local Object, if necessary. The Class Builder screen opens. Make sure it is the data and not the hierarchy transformation.
  5. Insert a row under the method and input the code.
  6. Choose Activate, select all objects, and choose Continue.
  7. To go back, press F3. Activate the BAdI. Next, choose Runtime Behavior. It says that the implementation will be called.

How to Enhance an SAP DataSource

To see how to Enhance an SAP DataSource, refer to this video.

Log in to track your progress & complete quizzes