Business Intelligence

How to Extract Data into SAP BW/4HANA Using Generic DataSources

In this blog post, we’ll walk through extracting data from SAP S/4HANA using generic DataSources and transferring that data to SAP BW/4HANA.

 

Replicate the DataSource

Follow these steps to begin replication of the DataSource:

  1. Replicate the DataSource based on the application component (see figure below). To do so, log onto the SAP BW/4HANA system, right-click the source system, and select Replicate to start the job for DataSource replication. 

Replication

  1. The screen will list all the DataSources that can be replicated, with the option to select and deselect DataSources. Choose the DataSource that you need to replicate, click Select Displayed Datasources, and then choose Next, as shown.

Choose Next and Finish

  1. Before starting the replication process, first check the header table for the SAP BW DataSource, which is RSDS. Enter the name of the DataSource—for this example, “ZRKGENDS1”—in the DataSource You’ll see that table RSDS doesn’t have that specific field, as shown in the figure below. Zero entries met the selection criteria. 

Before Replication

  1. Meanwhile, the replication job should have finished. When the replication is successful with the activation and the DataSource is saved in SAP BW/4HANA (next figure), you can open the DataSource and activate it using the icon if it isn’t active.

Job Finished

  1. After the completion of the replication job, check table RSDS again. The DataSource is now available in in M and A versions, as shown below.

A and M Versions

  1. To validate the DataSource replication, you need to search for the DataSource name in Eclipse and then open it. You can see that Adapter is set to Extraction from SAP System by Operational Data Provisioning and the ODP Context is based on DataSource/Extractors. you can see the operational data provider with the name of the DataSource, ZRKGENDS1 (see the next figure). 

Eclipse DataSource

 

Data Modeling for Generic DataSources in SAP BW/4HANA

With the DataSource available, you can create the SAP BW data model using these steps:

  1. Start with the creation of an aDSO with reference to the DataSource, as shown in the next figure. In this example, to start, right-click the RKPBGEN InfoArea and choose to create an aDSO. You’ll see the aDSO creation wizard. Name the aDSO “ZADGEN” and provide the description. You can see that the aDSO is based on the DataSource, so choose Browse in the DataSource field and select ZRKGENDS1 as the DataSource template. Once you choose the DataSource, the source system will be assigned by default. In this example, the source system is S4SCLNT100, which is the SAP S/4HANA system.

aDSO Template

Once the aDSO is created, activate it using the icon. Create a transformation for the aDSO with the source as DataSource ZRKGENDS1 and activate it. Create the DTP for the aDSO from the transformation; you can see that the transformation is based on the same generic DataSource (ZRKGENDS1). Activate the transformation and DTP as shown.

DTP for Generic Extraction

The final dataflow that can be seen from the aDSO level is shown in the next figure. The source system is S4SCLNT100, and it sends data to the ZRKGENDS1 DataSource. The ZADGEN aDSO fetches data using this DataSource. You can see the transformation and DTP in the dataflow between the DataSource and aDSO.

Display Data Flow

  1. Now execute the DTP using . You can see the request status in the web cockpit. Once you choose Manage Request, you can see the entries in the inbound table.

Inbound Table

  1. From the Manage Request area, you can activate the aDSO request. To do so, select the Activate After the activation is completed, you can see the data in the active table, as shown.

Active Data Table Content

  1. You can also check the active table for the aDSO based on the generic DataSource; as you know, the active table will end with 2. (See next figure.) In this example, the active table is /BIC/AZADGEN2 and it has 3,402 entries.

Active Table Contents

  1. You can remove 200 from the Maximum No. of Hits field and click Execute or press (F8) to see the total contents of the active table, as shown in the next figure. The total number of records in the table (3,402) is shown in the upper-right corner. 
Table Contents

 

Checking the ODQ

After the DTP is successful, you can see the status of the extraction job in the source system. Log onto SAP S/4HANA and execute Transaction ODQMON for the ODP-based delta queue. You’ll see that the queue (ZRKGENDS1) for the generic DataSource is created in the queue view. If you need to see the queue name that was created, set Request Select to All: this will ensure that the full request is also selected and the respective queues are displayed.

 

Transaction ODQMON

 

From the queue view, you can get to the subscription view and then the request view. Finally, in the units view, you’ll see the total number of rows is 3,402, matching the total number of records extracted using this DataSource. When you double-click that row, you can see the actual records that were sent to SAP BW/4HANA, and you’ll see that Storage is now set to ODQDATA_F for a full upload.

 

Units

 

The contents of table ODQDATA_F can be viewed as shown in the final figure. You can see this table in Transaction SE16.

 Table ODQDATA_F

 

Editor’s note: This post has been adapted from a section of the book Operational Data Provisioning with SAP BW/4HANA by Renjith Kumar Palaniswamy.

Recommendation

Operational Data Provisioning with SAP BW/4HANA
Operational Data Provisioning with SAP BW/4HANA

Operational data provisioning (ODP) is the new standard for data staging and extraction in SAP BW/4HANA—are you ready for it? Use ODP to extract information from SAP S/4HANA and connect to other key data sources, including SAP HANA calculation views, CDS views, open ODS views, and SAP BW. Use SAP Landscape Transformation Replication Server to replicate data, and review the prerequisites for SAP BW/4HANA remote conversion projects. With detailed instructions throughout, this hands-on guide has all the information you need to master ODP!

Learn More
SAP PRESS
by SAP PRESS

SAP PRESS is the world's leading SAP publisher, with books on ABAP, SAP S/4HANA, SAP CX, intelligent technologies, SAP Business Technology Platform, and more!

Comments