Show TOC

Procedure documentationEnhancing Operational Data Providers

 

If you also want to use customer-defined fields from a DataSource for Operational Data Provisioning, you can enhance the asociated SAP search and analysis model and add new fields to the Operational Data Provider (ODP). To fill the fields, you can reuse existing implementations for DataSource enhancements or create new implementations.

Prerequisites

You have added one or more fields to the DataSource that the ODP you want to enhance is based on.

Procedure

1. Enhance Search and Analysis Model and ODP

To add the fields that you have added to the DataSource to the search and analysis model and to the OPD contained there, perform the following steps in the model ing for search and analysis (transaction ESH_MODELER):

  1. Before you can enhance the search and analysis model, you have to create a customer-specific software component and incude the SAP software component of the search and analysis model that you want to enhance in your customer-specific software component.

    More information: Creating or Adapting a Search and Analysis Model

  2. In the modeling, select the search and analysie model that you want to enhance, choose Edit and confirm the popup asking whether you want to enhance the model.

  3. In the Model Node step, add the required fields to the node in question:

    1. Select the node that you want to add customer fields to and choose Start of the navigation path Update Node Next navigation step Upate End of the navigation path. The system addes the customer fields to the node and displays them as attributes under Details: Attributes of Node '<Node Name>'.

    2. To make the node attributes available in the ODP, select the attributes in the Selection. (Node Selection) column.

  4. In the Operational Data Provider step, add the required fields to the ODP:

    1. Select the ODP that you want to enhance.

    2. Under Details: Attributes of ODP '<ODP Name>', press Add.

    3. In the popup that now appears, select the model's enhanced node, select the attributes that you have added to the node and choose Select.

  5. Save the model.

2. Create Connector for Enhanced ODP

To ensure that the customer fields are available at query design time and at runtime, there must be a connector in the enhanced software component for the enhanced search and analysis model. To do this, perform the following step in the Administration Cockpit (transaction ESH_COCKPIT):

  1. Press the Create button.

  2. Select the enhanced, customer-specific software component.

  3. Select the enhanced search and analysis model and choose Create Connector. The connector is assigned to the customer-specific software component. This is also the case if the connector to this model already existed in the SAP software component. Existing connectors in the SAP software component are also added to the customer-specific software component.

    When the connector is created, an active version of the ODP is generated. The connector is displayed in the Administration Cockpit with status Prepared.

  4. In the TransientProvider preview for the active ODP version (transaction RSRTS_ODP_DIS), check the activation:

    • The active version of the ODP must be displayed in the customer-specific software component (in the preview header).

    • The active version of the ODP must display the fields that have been added.

    More information: Displaying the TransientProvider Preview

3. Create Query for Enhanced ODP

Copy the query provided by SAP to the ODP or create a new query and add the customer fields to it as characteristics.

4. Create Enhancement Implementation: Fill Customer Fields
  1. Create an implementing class:

    Case 1: Reuse existing implementations for DataSource enhancements

    If you use Business Add-In (BAdI) RSU5_SAPI_BADI or a customer exit of SAP enhancement RSAP0001 to fill the customer-specific fields in the enhanced DataSource, you can reuse this existing implementation for the DataSource enhancement for Operational Data Provisioning. To do this, you create an implementing class and an enhancement implementation that defines which DataSource the implementing class is valid for. Proceed as follows:

    1. Call the Class Builder (transaction SE24).

    2. Unter Object Type, enter class name CL_RODPS_DATASOURCE_EXT_XMPL.

    3. Choose Copy Class/Interface (Copy Class/Interface).

    4. In the popup the appears, enter the name of your customer class, continue and specify a customer package.

    5. In Class Builder: Initial Screen, under Object Type, enter the customer class name and choose Change (Change).

    6. To be able to reuse the existing implementation for the DataSource enhancement, the fields that are used (read or filled) in the enhancement have to be added to the projectoin and requested for the extraction. To do this, implement interface method PREPROCESS_PROJECTION. If you want to add fields to the projection, you can use method ADD_PROJECTION.

    7. Check, save and activate the class.

    Case 2: Implementation without reuse

    If it is not possible to reuse an existing implementation for DataSource enhancements, or if an implementation of this type does not exist, create an implementing class and implement the required methods. You have two options:

    • You can create a class of your own that implements interface IF_RODPS_DATASOURCE_EXT.

    • You can copy example class CL_RODPS_DATASOURCE_EXT_XMPL. The advantage here is that the example class provides further methods, such as a method that allows better access to selections.

    To use the example class, proceed as follows:

    1. Perform steps 1 to 5 as in Case 1.

    2. Implement interface method POSTPROCESS_PACKAGE and note the following:

      1. So that the standard exits for processing the DataSource enhancements are not used, make the following changes: Set variable l_process_standard_exits to abap_false.

      2. To allow the implementation of class method POSTPROCESS_IMPLEMENTATION to process the enhancement, make the following change: Set variable l_process_implementation to abap_true.

    3. Use class method POSTPROCESS_IMPLEMENTATION to implement the post-processing logic that defines how the fields are filled.

    4. Implement any further relevant methods.

    5. Check, save and activate the class.

  2. Create an enhancement implementation:

    1. Call the BAdI Builder (transaction SE19).

    2. In the Create Implementation group box, select New BAdI, enter enhancement spotRODPS_DATASOURCE_EXT and choose Create Implementation (Create Implementation).

    3. Under Enhancement Implementation in the next popup, enter a technical name in the customer namespace and a description for the implementation under Short Text and pressContinue (Continue).

    4. In the next screen, specify the customer class - that you created before - to be implemented for the enhancement implementation, select BAdI definition BADI_RODPS_DATASOURCE_EXT and press Continue (Continue).

      The maintenance screen for the enhancement implemenation appears.

    5. Using a BAdI filter, define which DataSource this BAdI implementation is valid for. In the enhancement implementation, go to the Enh. Implementation Elements tab and double-click Filter Value (Filter Value) in the tree.

      On the right of the screen, the Filter Values screen now appears.

    6. Press the Combination (Combination) button.

    7. Open the row under Combination 1 by double-clicking it.

    8. In the following screen, enter the name of the DataSource as Value 1 and choose the equal sign as the Comparator.

    9. Save and activate the enhancement implementation.

Result

Once you have activated the implementation, the fields are filled. For an unactivated implementation, the fields are also displayed in the query but are not filled yet.

If you use SAP HANA or BWA, make sure that the ODP is indexed.

More information: Starting Connector Indexing.

Reuse of Existing Implementations for DataSource Enhancements

If you reuse an existing implementation for DataSources, note that the BAdI is called during direct access and during indexing, thus ensuring that the query results in both cases are identical.

The table below shows how the system handles DataSource enhancements in various application scenarios:

Application Scenario

BAdI BADI_RODPS_DATASOURCE_EXT is not implemented

BAdI BADI_RODPS_DATASOURCE_EXT is implemented

Using the ODP (including indexing) for Operational Analytics

No existing implementation for the DataSource enhancement (BAdI RSU5_SAPI_BADI or customer exit of SAP enhancement RSAP0001) is called.

BAdI BADI_RODPS_DATASOURCE_EXT is called.

Using the ETL interface

The exsting implementation for the DataSource enhancement (BAdI RSU5_SAPI_BADI or customer exit of SAP enhancement RSAP0001) is called.

BAdI BADI_RODPS_DATASOURCE_EXT is called.

Data transfer to BW

The exsting implementation for the DataSource enhancement (BAdI RSU5_SAPI_BADI or customer exit of SAP enhancement RSAP0001) is called.

The exsting implementation for the DataSource enhancement (BAdI RSU5_SAPI_BADI or customer exit of SAP enhancement RSAP0001) is called.