Key User Extensibility in SAP S/4HANA Cloud – Data Source Extensions – Part 1
Key User Extensibility in SAP S/4HANA Cloud – Data Source Extensions – Part 1 (Enhancing the Data Source Providers and using it in the Fiori Analytical Reports)
Context of the blog
In this first blog, we will learn about the Data Source Extensions feature in SAP S/4HANA Cloud – Custom Fields and Logic app and learn how to use it.
Key Users of SAP S/4HANA Cloud
|SAP S/4HANA Cloud Release||SAP S/4HANA Release|
|1808, 1811, 1902||1709, 1709 FPS01, 1709 FPS02, 1809, 1809 FPS01|
Demo app used for this blog
Cost Centers – Actual
For the purpose of this blog, we will take the example of standard SAP S/4HANA app Cost Center – Actuals (Cloud Version), link here (https://fioriappslibrary.hana.ondemand.com/sap/fix/externalViewer/#/detail/Apps(‘F0963A’)/S15) is an Analytical app based on SAP Fiori Design Studio.
Note – There is an on-premise version of this app, link here (https://fioriappslibrary.hana.ondemand.com/sap/fix/externalViewer/#/detail/Apps(‘F0940A’)/S13OP) as well that supports the similar features and this blog is applicable for it as well.
With this app, we can do an actual analysis and report on actual data for different entities relevant for analysis. Some of the key features of this app include –
- Specify the search criteria using variables or filters
- Display the query results in a grid format
- Export the query results to Microsoft Excel
- Manipulate the query results grid by moving available characteristics to and from the grid axes
- Display read-only information about the underlying query, such as its technical name and when it was last updated
- And many more
The standard app has various dimensions already provided using which we can play around and produce different reports. As you can see from below screenshot, we have numerous dimensions in the left pane already available to get the Cost Center Actual Report
[Fig 1: Standard available Dimensions]
Let us consider a scenario where a business user/end user would like to have few more dimensions added to produce the report in this application. Let us assume that we want to add two more dimensions – Source Ledger and Fiscal Year to the report. Now if do a search for these fields in the search box, we will see that these are not available in the standard report.
[Fig 2: Search for Source Ledger in the search box]
[Fig 3: Search for Fiscal Year in the search box]
As you can see from above, we are not able to find out these two fields for our reporting purpose.
We would need to enhance the Data Source Provider of the query and extend it to include the standard fields that are currently not available for this application. The Data Source Provider is nothing but the underlying CDS view part of the SAP S/4HANA Virtual Data Model.
Note – The additional fields that we add to the Data Source are Read Only.
Let us go ahead and see how to extend the Data Source Provider and include these new standard fields so that we can use it in our application.
From the SAP Fiori Launchpad, click on the app – Custom Fields and Logic
[Fig 4: Custom Fields and Logic app]
Now click on the tab – Data Source Extensions
[Fig 5: Data Source Extensions]
Under this tab, you will find the list of previously extended data sources if any. Now click on the + icon to create a new data source extension.
[Fig 6: Create new Data Source Extension]
From the drop-down, we need to choose the Data Source for which we would like to do this extension so that the newly included standard field is available in the application.
Let us pick up the Data Source – Cost Center – Actuals that we need to extend with the standard fields for the application
[Fig 7: Choose the Data Source – Cost Centers – Actuals]
Now enter the desired description in the Description field.
[Fig 8: Provide the desired description]
Note: As you can see, the system by default picks up the Extension ID name starting with YY1_ as key in the description. You can also change it to your own and something meaningful. As you can see from below screenshot, we changed it to YY1_CC_ACTUALS_DS_EXT.
Now click on the – Create to create a new Data Source Extension.
[Fig 9: Change the Extension ID]
Now as you can, we have the Data Source Provider available in the left pane under the tab – Field Selection.
[Fig 10: Data Source Provider]
Expand the Data Source Provider and you can see the list of all the available standard fields from which we can choose and create the extension.
[Fig 11: Available standard fields in the CDS View]
Now select the desired fields, in our case – Source Ledger and Fiscal Year and they will appear under Selected Fields in the right pane. You can also provide your own name to these selected fields.
[Fig 12: Selection of the fields from Data Source Provider]
Next click on – Save to save the changes. Once saved, Publish button will be enabled. Click on – Publish to publish the extension. As you can see from below, the system starts publishing the newly created Data Source Extension.
[Fig 13: Publish the Data Source Extension]
Once published, the status will turn into green published text.
[Fig 14: Data Source Extension is published]
Now let’s go back to our application – Cost Center Actuals and search for these two newly extended standard fields – Fiscal Year and Source Ledger
[Fig 15: Fiscal Year is now available]
[Fig 16: Source Ledger is now available]
Now in the next step select both these fields and drag and drop them to the section – ROWS. Now you can see that additional two columns are now added in the application.
[Fig 17: New standard fields included in the application]
Looking at the details of the Data Source Provider – I_JournalEntryItemCube. Go to the View Browser App and put this name in the search field.
[Fig 1: View Browser]
[Fig 2: Check the Data Source Provider]
[Fig 3: Data Source definition]
Congratulations you have just finished Key User Extensibility – Enhancing the Data Source Providers and using it in the standard SAP S/4HANA Reports!
For Part – 2 of this blog series, please choose the following link –