top of page

Custom Built Commenting Functionality in SAP Analytics Cloud(SAC)! (2/2)

Updated: Jun 14, 2021

In Continuation, with the blog post published earlier

Let us discuss the technical details about the solution implementation and a demo here in the following blog.

So, get ready to dive in through the details.

As shown in the above picture, we will use SAC Analytical Application, as it has the flexibility to custom code.

Let's consider the scenario where we are doing Sales Analysis of different sales managers in the SAC Analytical Application. We need commenting functionality during the review meeting for the Head of Sales, to add his comments on the different sales managers.

The first object to be created is the HANA table, where we will be storing/saving the comments which are added from the SAC Analytical Application, the HANA table will have fields like below.

COMMENT_ID : The id of the comments, is the primary key for the table.

STORY_VALUE : The filter value of the context, for instance, in this demo, we are analyzing the sales manager, so Sales Manager ID can be passed as filter value to this column

COMMENT: The textual comment that is to be saved.

Once we have the table ready, we create a HANA calculation view, on top of the HANA comments table. This HANA view is used to retrieve the comments stored in the table in the SAC Application using the HANA live connection.

The next step is to create a SAC Analytical model using the calculation view.

Later, we will come to the interesting part, that is to provide an interface to the user to input the comments, for this purpose ,we will use the UI5 Web application.

The UI5 Web application can be custom designed to suit the user requirements, in our case. we only need to input one comment at a time.

We have used XSJS to do the server-side scripting, which will capture the comment entered and saves it into the table.

We can add different operations like Create, Update, Save and History to do the creation of comments, Updating, saving of modified comments and Auditing of the comments

respectively in the UI5 Web Application.

In case, if you need to comment on multiple fields at a time, you can add more UI elements to the web application.

Once we have these objects ready, we will move to the SAC Analytical Application to create the front end elements like Graphs and Tables in the dashboard.

For the SAC Part, We will use the SAP demo model which is the "BestRunJuice_SampleModel".

First, let us create a sample chart showing the Gross Margin and Quantity Sold, by each Sales Manager for different products.

For this, we add the Table widget in SAC using the SAC Analytical Model, which we just created above.

We will select only the comment column for display in the designer tab of the analytical application.