Configuring comments
The comment component allows app viewers to add text-based comments within a View. These comments are associated with individual rows in a Data Model table, so you must provide an identifier definition for the respective table in the Data Model before configuring your comments component.
Once a Data Model table has an identifier set, you can then configure your comments component. This includes mapping the identifier to ensure that the comments are added for their correct row in the Data Model. Usually, those inputs are filled by variables, but they can also be filled with plain-text values.
In this example, a comment box within a View is allowing team members to communicate about a KPI:
Prerequisites - Setting an identifier
Before configuring your comments component, you must set an identifier for the data model table you want to associate the comments with.
For the step-by-step instructions, see: Setting identifiers.
Configuring the comments component
To configure a comments component, you need to create and reference an 'identifier' for the Data Model table you want to associate comments with:
Drag and drop the Comments component onto your View.
Using the component settings, click Show comments for - Select table and then select the table you want to use for this comment component.
In this example, we'll use the table BKPF:
For each column in the selected table, assign either a variable or a plain-text value.
In this example, we're adding a variable for the BELNR column:
And the completed configuration for all four columns:
Optional: Select your comment style, including the date formatting and the maximum number of comments displayed.
Use Interactive Mode to test your comment component, correcting any highlighted errors if necessary.
Using comment information in PQL
Once the first comment is written in the component an augmentation table is created and added to the Data Model automatically. This table contains information around the comment such as the author, the message, or the creation time. The table storing comment information gets updated in real time and can be queried in the PQL editor.
As an example, all comments created for one row of the BKPF table can be counted via PQL:
As comments are saved in augmented tables in the Data Model, they can also be added as columns in a table and used in linked Views.
For more information about creating tables, see: Tables.
In this example, the table has been configured to include columns on 'Last comment' and '# Comments':