Skip to Content
Technical Articles

Leverage the power of SAP S/4HANA core data services in Cloud Platform Integration for Data Services

Dear Readers,

This blog post is a step-by-step to use SAP S/4HANA core data services in Cloud Platform Integration for Data Services. Core data services provides views through which you can import master and transaction data into CPI-DS and further integrate it to SAP Integrated Business Planning(IBP).

There are many standard core data service views available in the SAP S/4HANA. Use the View Browser app to view the wide range of core data services analytical and non-analytical views. These views are pre-defined and ready-to-use views. If the View Browser app does not have the view you need, then you can define your own CDS view in SAP S/4HANA through the Custom Analytical Queries app. You can eliminate the need of custom programs by using these CDS views to import data from SAP S/4HANA into IBP through CPI-DS.

One of the possibilities to use CDS views to import data is by using Custom ABAP transform in CPI-DS(Cloud Platform Integration for Data services). Execute the below steps in the CPI-DS, CPI-DS agent and the SAP S/4HANA to realize this.

Step 1: In SAP S/4HANA: Check which view you would like to use. A simple search on the view browser app in the SAP S/HANA will provide a view that you could consume in CPI-DS Custom ABAP transform. Note that in the definition of the view there could be parameters that might be required during the data extract. In the below example CDS view, P_ExchangeRateType and P_DisplayCurrency are the 2 input parameters required by the select query while querying this CDS view from SAP S/4HANA.

Execute the below steps in CPI-DS.

Step 2: Create a CPI-DS task which has the source as the SAP S/4HANA and the target as IBP.

Step 3: Create a CPI-DS data flow as shown in figure 1 and drag and drop the Custom ABAP transform into the data flow. In the example in figure 1, I have used the CDS view: I_SALESORDERITEMCUBE to integrate the sales order transaction data.

Figure 1: Data flow in CPI-DS

Step 4: In the Custom ABAP, create the output parameters. In the example shown in figure 2, I have extracted the Sales order number, Material, Plant and Order quantity from the CDS view: I_SALESORDERITEMCUBE.

Figure 2: Custom ABAP transform properties.

Give the file path and name of the .aba file. Provide the job name. This job name is displayed in SM37 transaction in SAP S/4HANA after the CPI-DS task execution. Provide an ABAP program name. Save the custom ABAP.

Step 5: Create the .aba file and insert the form routine in the .aba file as shown in figure 3. Ensure that this file is saved in the CPI-DS agent abap folder.

Figure 3: Example of ABAP form for the .aba file.

Step 6: Create a Query transform in the data flow as shown in figure 1 and map the output fields of the Custom ABAP to the Query transform input and output fields. Run the Query transform in design mode for testing the Custom ABAP.

Figure 4: Design mode output of the Query transform.

You have now used the CDS view to get the data into CPI-DS.

4 Comments
You must be Logged on to comment or reply to a post.
  • Good Blog. Thanks for sharing. However, can we achieve the same by consuming ISDSALESORDERIC which is the SE11 view of the CDS view I_SALESORDERITEMCUBE? In that case we will not need the custom ABAP.

  • Is it possible to have multiple Custom ABAP (lets say I want data from 2 table) inside one box? I wasn’t able to succeed in connecting additional ones to an ABAP endpoint…

    • hi Timothy,

      you can use the ABAP query for this rather than a custom ABAP. i.e.: Use the ABAP query and then do the joins inside the abap query. Alternatively you can also use the normal joins on the source tables as well. Hope this helps.

  • Hi All,

    I keep on having access issue as follow when executing the task. Any idea?

    2020-06-04 15:09:20 (R)(15904:17428) R3C-150301 |Dataflow DAVID_TASK_DAVID_FLOW
    Error opening file <DAVID_TASK_R3_DAVID_FLOW.Aba>.
    2020-06-04 15:09:20 (E)(15904:17428) R3C-150301 |Dataflow DAVID_TASK_DAVID_FLOW
    Error opening file <*****>. This message contains some internal system details which have been hidden for security. If you need
    to see the full contents of the original message, ask your administrator to assign additional privileges to your account.
    2020-06-04 15:09:20 (R)(2960:17904) R3C-150301 |Dataflow DAVID_TASK_DAVID_FLOW
    Error opening file <DAVID_TASK_R3_DAVID_FLOW.Aba>.
    2020-06-04 15:09:20 (E)(2960:17904) R3C-150301 |Dataflow DAVID_TASK_DAVID_FLOW
    Error opening file <*****>. This message contains some internal system details which have been hidden for security. If you need
    to see the full contents of the original message, ask your administrator to assign additional privileges to your account.

    Best Regards

    David Yee