Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
Showing results for 
Search instead for 
Did you mean: 


For all those who are in a hurry, these pictures might explain everything:

Comments on BW/BPC live connections in QRC2.2023

Formatted comments with QRC3.2023

All those who are interested in a little more information we would like to invite to continue reading to find out the details of this exciting new feature...



In many reporting or planning scenarios the ability to comment on the numbers is a crucial requirement. In SAP Analytics Cloud we offer an established functionality that allows the end user to either comment data directly in a table (data point comments) or as a sort of summary in a so-called comment widget. Unfortunately, this functionality has only been available with SAC acquired models. That means commenting data that is provided via a live connection has not been possible.

With QRC2 2023 we now offer the ability to comment on data that is provided by a BW live connection or a BPC live connection. Here we take advantage of the commenting solution that has been offered in SAP BW/4HANA before. This solution has been extended to SAP BW 7.50 on Hana and is now available in SAC with the BW live connection and the BPC live connection as well. This implies that the comments are managed and stored in the BW/BPC system and created, displayed, edited, or deleted through SAC. No commenting information will be stored in the cloud - a requirement we often hear from customers in the Defense or Banking Industry or in Public Sector.

The comments are also integrated with other BW Front ends - comments that has been created in SAC can also displayed, changed, or deleted in SAP BO Analysis for Microsoft Office and vice versa.


Comments are stored against a selection. We offer three ways of accessing a comment:

  • Data point comments: comments are displayed in a table - either via an indicator in the cell or in a separate column. The chosen model, the table structure (row and column selection), and the general filters (query filters, SAC story and page filters) determine the selection for the given data cell and thus the corresponding comment.
  • Comment Widget: the comment is displayed in a special widget similar to a text box - a model and one measure have to be selected (in case of a two-structure query also a member of the second structure has to be defined) and further filters can be defined in the widget itself or can be applied via story or page filters. If the selection for a comment widget is the same as for a certain cell in a table, then the same comment is displayed.
  • Script API: comments can also be accessed through a java script API.

Comments can be used in pure reporting queries (BW live connection), and also in planning enabled queries (BPC live connection). The necessary license is determined by the connection - when using a BW live connection an SAC reporting license will suffice to comment. When you are using a BPC connection this connection type already requires an SAC planning license to use the connection.

Comments can be entered on various types of cells: cells on lowest level of aggregation in the InfoProvider, but also on cells that consist of aggregations - cell in queries where certain dimension have been removed from the drill, totals and subtotals, hierarchy leaves and nodes, base measures, restricted measures and even calculated measures. In the case of restricted measures, the restriction will be analysed and the comment will be stored on the base measure with the corresponding restriction (but not on the NAME of the restricted measure). In case of calculated measures, the name of the measure will be used as a key.

Please note that if a comment is stored on a total then this total is seen as an own entity - the comment comments this entity and is NOT some 'aggregation' of underlying comments.

Technical Prerequisites

As indicated above, we started from the existing BW/4HANA commenting solution and extended it. The commenting feature is now available with:

  • BW 7.50 on HANA, SP23
  • BW 7.57 on HANA, SP00
  • BW/4HANA 2.0 SP07-SP12 with note 3244228 or SP13 and higher
  • BW/4HANA 2021 SP00-SP03 with note 3244228 or SP 04 and higher

Please also check notes 3133846, 3169011, 3242613, 3261834, 3348600, 3366614, 3380072, 3383243, 3387309, 3387849, and 3397306 (not all of them might be necessary).

On the SAC side you need QRC2.2023 for a QRC based tenant and wave 4 2023 for fast track tenants.

If you want to use the formatting option you will need QRC3.2023.

Please also consider implementing note 3436199. It relaxes a restriction for the possible size of the document store.


Configurations in BW/BPC

In order to use the commenting feature, you have to perform some steps in the backend system.

Document Store

Comments are stored in so-called document stores. A document store is created in the BW Modelling Tools. Upon creation of the document store you specify a BW InfoProvider. The document store will inherit all dimensions from this InfoProvider. The document store can then be used in any BW query that is defined on this InfoProvider. Please note that you can create several document stores for the same InfoProvider.


Please also consider implementing ABAP note 3383708. This note assures that the name speaces /1B0/ and /1BW/ do not need to be set to 'modifiable' in the target system when transporting the document store.


As already mentioned above there is a restriction to the size of the document store. When using large Composite Providers you could run into this limitation. Note 3436199 relaxes that restriction and should therefore be implemented.


BW/BPC Query

You can decide for each individual query whether it should use comments or not. In order to use comments, you have to select a BW/BPC query, go to the tab 'Runtime Properties' and set the property 'Document Support' to 'Yes'. You should also select a 'Default Document Store'. In Analysis for Office, it is possible to set or switch the document store at runtime, in SAC this is not yet possible.

Settings in Query Designer

If you have two different queries defined on the same InfoProvider and if they use the same document store, then you can see the same comments in both queries. Here it does not matter whether the query is input enabled or not. However, if you want to see different comments in different queries then you can assign different document stores.

As already indicated above calculated measure can also be commented but you must specify a technical name for the measure in the query designer.

Please note that comments are only available on modelled queries in BW/BPC. Comments are NOT available on CDS queries and thus commenting on S/4 live connections is not possible.

Remark on Handling of Calculated and Restricted Measures

In BW/BPC we often use restricted or calculated measures. Those can also bear a comment.

  • Calculated Measures: A calculated measure can usually not be resolved to its base measures (it might use more than one) and a selection. But the system needs a technical identifier for storing a comment. Thus for a calculated measure comments can be used if the calculated measure has been explicitly given a technical name when defining the query. The comment will be stored against this name.
  • Restricted measures: here we have a twofold approach.
  • If the restricted key figure has not been given a technical name then the system will resolve the selection in the definition of the key figure and will use the resolved values and the name of the base key figure as a key. This holds also true for variables - the variable will be replaced by its actual value(s) and the value(s) will be used as key.  Thus if - for example - you use a restricted key figure with the year as a variable and change the variable value the comments in the column will changes accordingly.
  • If the restricted key figure has been given a technical name then we use the technical name as a key and do NOT resolve the selection. If you use a variable in the restriction then the variable name and the actual value of the variable are used in the key for the comment as well.

In most cases using restricted key figures WITHOUT a technical name will produce the expected behavior. This is why NOT using a technical name is recommended. However, in certain cases using a technical name for a restricted key figure can solve special requirements.

Access Control

There is an authorization object for the document store (S_RS_DOCA). With this authorization object it can be controlled whether a given user can access comments stored in a given document store and whether the user can only read or also create/change/delete such comments.

We do NOT have a selection-based authorization. However, comments can only be viewed by the end user via a query cell. In case of the data point comments the used cell is obvious, but also in the case of the comment widget the system logically uses a query that is restricted to exactly one cell. If a user does not have sufficient Analysis authorizations to access this cell then also the comment cannot be used.

Please note that only the access control in BW is taken into account. Any such setting in SAC will be ignored.

Comment History and User/Time Stamp

In BW for a given selection there is only one comment. This is different from the SAC acquired case where we have a comment thread and might have several single comments in this thread. But each BW comment has a history. Whenever a comment is changed, the previous comment will be kept in the history (which can be regarded as a change log).

A comment can be changed by any user that has the authorization to do so. The username and a time stamp will be kept with every new version of the comment. Thus, it is obvious who has done changes to a given comment.


CORS Settings in BW system

The comment feature use a new INA endpoint (path: /sap/bw/ina/Documents). You have to make sure that either the path /sap/bw/ina (and thus every sub-path) is allowed in CORS or - in case you have explicitly specified the sub-paths - you have to add the new path /sap/bw/ina/Documents.


Use of Comments in SAC

Once you have customized the BW/BPC system you can use the comments in SAC.


Data Point Comments in a Table

If you want to use comments in a data table, you have to enable the comments using the flag 'Allow Data Point Comments' for this table in the design panel (just as with comments on acquired models).

Allow Data Point Comments

Now you can see the comment indicator in all cells that already bear a comment. By clicking on the indicator, you can open the comment.

Show Data Point Comment

You can see the comment, the user who has created the comment (please note that this user is the BW/BPC user, not the SAC user) and the time stamp. Now you can either change the comment, delete the comment, or display the history.


By default we display the user ID but not the full name. If you want to change this please implement note 3396991.

History of Comment

Instead of using the comment indicator you can display the comments in a comment column in the table (just as with comments on acquired models).

Comment Column

By clicking on an existing comment, you can open the comment popup that you know already. If you click on an empty comment cell or start typing on any cell you will jump directly to the edit mode of the comment popup.

Edit Comment

Just as a reference let us have a look at the comment we have used above in Analysis for Office.

Comment in Analysis for Office

As you can see, we indeed can access the same comment for Austria/Juice that we have already seen above in SAC.

Finally let us have a look at a comment entered on a total. If you look at the lowest line you can see that we have a comment on the total for all product groups for the country Austria. And the comment does not contain any of the comment entered for a specific product group but is an entity on its own. The same is possible with hierarchy nodes.

Comment on Total


Comment Widget

When you create a new comment widget you will have to specify the model first. The system will detect the available measures in the underlying query. You will have to select one of those measures for your comment widget. If the underlying query has two structures, you also have to restrict the second structure to a single member.

New Comment Widget

If you want you can add further widget filters.

You can now enter new comments already.

New Comment in Comment Widget

If there has been a comment already for this selection, then you will see the comment with its history.

Comment with History

If you do not want to see the history and/or the comment details (username, time stamp) you can switch them off individually (in customizing as well as at runtime).

Hide History or Details


Formatted Comments

With QRC3.2023 we provide also provide the possibility to format the comments. The formatting options are the very same as for comments on acquired models and are available in the comment widget as well as in the data point comments.

Please note that if a data point comment is displayed in a comment column then only the plain text will be shown. If you want to see the formatted comment you have to open the comment in the column by double clicking.

The formatting will be stored as tags directly in the comment string in BW.

Analysis for Office does not support any formatted comments. If you open a formatted comment in Analysis for Office the you will see an unformatted version of the comment. If you change the comment in Analysis for Office you will loose all the formatting and the system will store the change unformatted comment. In order to prevent a loos of work you will be warned if you try to change a formatted comment in Analysis for Office. Also the formatted version is kept in the history so if you have removed all the formatting by changing a comment in Analysis for Office you can simply add the formatting again in SAC (using the previous comment with its formatting as a reference).

Conclusion and Outlook

As described above you now can use commenting also on BW and BPC live connections. There are certain (small) differences compared to the use of comments on acquired models - mainly as we started from the established BW/4HANA solution and want to ensure the compatibility with the use of the comments across the BW platform.