Sitemap

SAC/APP — Create a⚠️Warning for unsaved data

3 min readMay 2, 2025

--

As a SAP Analytics Cloud consultant, how many times have you been contacted because “the published data doesn’t fit”? This issue often occurs because planning users impute the data but forget to publish it.

📉 In this post I will teach you how to minimize the volume of incidents with a simple trick.

In this post, I’ll explain in a simple way how to display a warning message when data has been imputed but hasn’t yet been published or reverted. This way, the user is more aware of their planning process.

Press enter or click to view image in full size

💭Imagine you have this table to impute values ​​in the Actual version

When a new value is entered (or an existing one is changed), the change is detected and the warning will appear until the data has been published or reverted.

Press enter or click to view image in full size

As you can see, the “Publish Data” button is enabled, and the data needs to be saved. Therefore, the warning appears above the table.

Get Nora Roser Tamarit’s stories in your inbox

Join Medium for free to get updates from this writer.

Once the data is published or reverted, the warning disappears:

Press enter or click to view image in full size

Creating a warning sign is very simple. Simply insert the text you want, in my case “Warning: Unsaved data. Please, revert or save data.”

This text should remain hidden by default. It should only be displayed if there is data pending publication/reversion.

The script with the logic will be applied in the “Edit Scripts” of the table, in the “On After Data Entry Process” mode:

Press enter or click to view image in full size

This mode“On After Data Entry Process” is called when the table’s data has changed, either manually, by copy/paste, or with the API.

Press enter or click to view image in full size

Code

var table = Table_1;
var text = Text_1;
var unsaved_data = table.getPlanning().getPublicVersion("Actual").isDirty(); //Detects if there is data to save for a given version

//The warning is displayed depending on the "unsaved_data" variable, if there is unsaved data.

if (unsaved_data === true){
text.setVisible(true);
} else {
text.setVisible(false);
}

You might be wondering, “If I impute the data and exit the dashboard without publishing/reverting… Will the warning still appear when I log back in?” The answer is yes ✅. It detects data that needs to be published/reverted, even if it was imputed at a different time, not just in the current session. Therefore, the warning will appear when I log back in.

With this simple development, you can significantly reduce the number of incidents in your planning processes! I hope it is useful to you

--

--

Nora Roser Tamarit
Nora Roser Tamarit

Written by Nora Roser Tamarit

Senior Business intelligence consultant specialized in SAP Analytics Cloud (SAC) sharing knowledge and experience