S/4 HANA Cloud Data to SAP Analytics Cloud (Custom CDS Views, Custom communication scenario and Acquired data connection) – Part 1
Welcome to Part 1 of my two part blog post series about my recent experience using Extensibility capabilities within S/4 HANA Cloud to expose Custom CDS (Core data services) views by using Custom Communication Scenarios and connecting to them in SAP Analytics Cloud as acquired data sources to query and model for stories.
In Part 1, I would like to demonstrate the available extensibility capabilities to expose your custom CDS views to SAC (SAP Analytics Cloud)
- Create Custom CDS view (Scenario – External API)
- Create Custom Communication Scenario
- Publish CDS view to Custom Communication Scenario
- What’s Next?
Before you start make sure that you have got access to Extensibility and Communication Management apps on your Fiori launchpad.
If you don’t have access to these apps, request your administrator to assign them to you.
More specifically ask them to assign following roles.
BR_ANALYTICS_SPECIALIST – Analytics Specialist
BR_CONF_EXPERT_BUS_NET_INT – Configuration Expert – Business Network Integration
Next Step is to create connection between S/4 HANA Cloud and SAP Analytics Cloud. All of the information is available in scope item Import Connection setup with SAP Analytics Cloud (1YB)
You can also access setup guide directly from here.
Once finished with setting up connection you should able to get one communication system and one communication arrangement.
Now that we have done all the prerequisites. Take a note of your Communication system, which we will use while we are setting up Custom Communication Scenario.
Create Custom CDS view (Scenario – External API)
This is where things get exciting.! I am particularly enthusiastic with what SAP has done with the custom CDS views app. It has guided workflow from point you hit the create button till you publish your CDS view to a custom communication scenario.
Access to Custom CDS Views app and hit create button.
Now enter Label information and select Scenario as External API. Then hit create button.
For this example, I have selected a simple scenario for my Custom CDS view. At the end I want to find out the number of purchase requisitions and purchase requisition items created by specific user.
To achieve result, I would need to combine two pre-delivered Data sources and use their element:
- I_PurchaseRequisitionItemAPI01 (Purchase Requisition Item API01)
- I_USER (User)
We will now select Primary data source, search for Purchase Requisition Item and select the data source as shown below.
Once you add the data source, we can see the workflow where it guides us to get through this process of creating and publishing Custom CDS View.
Now we will add associated data source in following steps. Finally, click OK button once you select the data source.
Next, we will join the data sources. first we select element for associated data source
 click on join button.
 Add join Condition
 Select the element form associated data source.
In next step, we will add element form Primary data source
 select the value box to open dialog box.
 Drill down your primary data source and find joining element.
 Select the element and close the condition dialog.
**If system suggests you to change Cardinality. Please do changes accordingly**
Now we will select elements from data sources.  Navigate to elements tab,  click on Add and  select listed elements
- Purchase Requisition Item API01
- Item Net Amount (measure)
- User Id
- User Name
After we select our elements, Click on Publish button to save you CDS View.
I haven’t actually followed the given workflow. It is not necessary to follow all the steps. Depending on your scenario and needs you will be using other tabs. You can find more information about available features from Creating Custom CDS Views help document
Create Custom Communication Scenario
Now we will create Custom Communication Scenario, for that we need to navigate to Custom Communication Scenarios app.
You can do this in two ways.
Click on Next Steps from your custom CDS view and click on Custom Communication Scenarios
Access to the app directly from your Fiori launchpad
Now click on  New button,  enter ID and Description and  Click on new again.
Screen will automatically navigate you to Communication Arrangement screen and ask you to Create. Select the scenario you just published and hit Create button.
Now we need to select Communication system, (which we have created in Prerequisites) and hit save.
Once Communication Arrangement is saved. Navigate back to Custom communication Scenarios app, then navigate to your scenario and make sure that Communication Arrangement is correctly added.
Publish CDS view to Custom Communication Scenario
We are almost at the end of Part 1 of this blog series. This step is the easiest part of this blog.
We just need to select the Custom CDS View in Inbound Services and Publish it.
Click on Inbound Services tab in your custom communication scenario and click + to view available CDS views.
Now select your Custom CDS View and hit Publish button
That brings us to the end. We have successfully exposed our custom CDS view to Analytics Cloud as an Acquired Data Source.
Now we have completed S/4 HANA Cloud side of things.
In Part 2, we talk about reviewing data connection, accessing our data source, querying, modelling and creating a story in SAP Analytics Cloud.
In short, Part 1 was all about preparing S/4 HANA Cloud, Part 2 is dedicated to SAP Analytics Cloud.
Nice information. Good start.
I am working on SAC planning with S/4 Hana On-prem.
I could not find the field for exporting Quantity fields from SAC to S/4 Hana.
Can you try to explore about this requirement and though some light on how to create new CDS view to export Quantity data - Activity quantity and Product plan quantity from SAC to S/4 Hana on-prem