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.
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:
- Attach extra fields to the DataSource: create a customer append.
- 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 Warehouse → Postprocessing of DataSources → Edit DataSources and Application Component Hierarchy.
Selecting the DataSource: carry out the following three steps:
- Select Enhance Extraction Structure.
- Accept the proposed name, which is ZA, followed by the name of the extraction structure.
- Maintain the fields that you want to enhance later. All these fields must start with ZZ as a way of identifying their special purpose.
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 Utilities → Display Entire Docu in the project management of SAP enhancements transaction CMOD.
The preceding figure shows an example of code for a function enhancement.
Hint
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.
Note
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:
- Log on to the source system.
- Test and debug in extractor checks (RSA3).
- Monitor running tasks (SM50).
- Start extraction with the Data Transfer Process in SAP BW/4HANA.
- Locate the process in the monitor and start troubleshooting.
- 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