Developing a New Custom Data Source in SAP C4C Using SAP Cloud Application Studio (SDK)


We already explained in this blog Developing a New Custom Data Source in SAP C4C, how to develop a new data source of types joined or combined directly within SAP C4C. Now, in this blog, we will learn how to develop a new custom data source (and not a joined or combined one) for a custom/standard business object in SAP C4C using SAP SDK. This data source can be used further for developing a new report, key figure or a new custom KPI. It means, developing a data source gives us more flexibility to develop more helpful analytical dashboards and reports.

As starting point, we should open the desired solution in SAP SDK and then right click on the desired folder and select “Add – New Item …”.

Image%2001%3A%20Add%20a%20New%20Item%20in%20SAP%20SDK

Image 01: Add a New Item in SAP SDK

Then, we will see following popup in which we need to select “Analytics – Data Source” and the put a name for it:

Image%2002%3A%20Add%20New%20Data%20Source%20in%20SAP%20SDK

Image 02: Add New Data Source in SAP SDK

If we select “Joined Data Source” or “Combined Data Source” in the above screenshot, then we will be redirected to SAP C4C for creating a new data source which is already explained in Developing a New Custom Data Source in SAP C4C.

Then we see next popup in which we should provide more details. Some of these details are clear, but here is more details SAP provided for last three fields:

  • Enable Access Control: Select this checkbox to allow restrictions for data from this data source. This data that users can access is defined in the work center view to which a report is assigned. To enable access control, your business object must contain an association that is marked as relevant for access control.
  • Allow Referencing: Select to allow referencing by another data source and allow the fields of your data source name to be used in reports based on the referencing data source.
  • Log Sensitive Personal Data: Select the checkbox to enable read access logging for sensitive personal data.

Image%2003%3A%20Add%20Details%20of%20New%20Data%20Source%20in%20SAP%20SDK

Image 03: Add Details of New Data Source in SAP SDK

In the next step, we select desired fields, nodes and associations which we want to add to data source in and output.

Image%2004%3A%20Selecting%20Desired%20Fields%2C%20Nodes%2C%20and%20Associations

Image 04: Selecting Desired Fields, Nodes, and Associations

Now, it is time to define transformation rules for business object elements. Here, we have this option to rename field names, as we see below. In some cases, we can select a second parameter within the transformation rule. For more information about possible transformation rules, we can refer to Transformation Rule.

Image%2005%3A%20Define%20Transformation%20Rules%20for%20Business%20Object%20Elements

Image 05: Define Transformation Rules for Business Object Elements

In the next step, we can define aggregations which allows us further to calculate new key figures. In our example, we defined three aggregations on the field quantity as maximum, minimum, and summation. However, based on field type, we may have different possible aggregations in C4C.

Image%2006%3A%20Define%20Aggregation%20Behaviour%20for%20Business%20Object%20Elements

Image 06: Define Aggregation Behaviour for Business Object Elements

Finally, we can review everything and confirm it.

Image%2007%3A%20Review%20and%20Confirm%20the%20New%20Custom%20Data%20Source

Image 07: Review and Confirm the New Custom Data Source

We can also access to the created item any time int the solution and update it, if required.

Image%2008%3A%20Review%20and%20Update%20an%20Already%20Created%20Custom%20Data%20Source

Image 08: Review and Update an Already Created Custom Data Source

As a conclusion, we are now able to develop a new custom data source for a standard or custom business object. This can be later used in C4C to develop new joined/combined custom data sources.

I would like to request you to share feedback or thoughts in a comment and follow my profile (Mohammad Salmani) for future posts.

If you have any question regarding SAP Cloud Applications Studio you can ask it here or even read other blogs through this link.

Moreover, there are some other related blogs which I published as following:



Source link

Be the first to comment

Leave a Reply

Your email address will not be published.


*