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.
cancel
Showing results for 
Search instead for 
Did you mean: 
ChrisBavington
Advisor
Advisor
1,076

A new table event “onAfterDataEntryProcess()” will be available with QRC1 2025 release in SAP Analytics Cloud. Please read this blog by my SAP colleague for details.
The “onAfterDataEntryProcess” event in SAP Analyti... - SAP 

 

We will be utilizing some simple scripting with a story using Optimized Design Experience. If you are not familiar with scripting, please check out these links.
https://community.sap.com/t5/technology-blogs-by-sap/unifying-story-and-analytic-application-with-th...

https://help.sap.com/docs/SAP_ANALYTICS_CLOUD/00f68c2e08b941f081002fd3691d86a7/6a4db9a9c8634bcb86cec...

SAC Default Logic design flow

CSB67_0-1738696856350.png

Detailed Steps to Implement

1. Create a new story using Optimized Design Experience

2. Add a table and layout rows, columns and filters as required to support planning entry

a. Change Id to T_Plan_Input

3. Add a button with description Clear Logs

a. Change Id to B_Clear

4. Add a button with description Calc Cost Centers #0

a. Change Id to B_DA_Run

5. Add a drop-down selection box

a. Change Id to DD_Cost_Centers

6. Add a Script Variable (under scripting)

a. Name: Changed_Cost_Centers | Type: string | Set as Array: On

7. Add a Data Action (under scripting)

a. Change Id: DA_RUN
b. Set default Version as required
c. Leave Cost Centers parameters blank

CSB67_2-1738697134946.png

Sample layout of story

CSB67_3-1738697223063.png

8. Edit onAfterDataEntryProcess script of T_Plan_Input table and add this code

CSB67_0-1738697731652.png

If user makes changes to the same Cost Center in different rows, it will be added to the array only one time.
Line 8 captures the Cost Center Id only which the user can see using the Drop Down.

9. Edit onClick script of B_DA_Run button and add this code

CSB67_1-1738697873611.png

10. Edit onClick script of B_Clear button and add this code

CSB67_2-1738697938436.png

11. Save and close the story.

 

Configuration of Data Action Parameter

CSB67_3-1738698275805.png

Data action using Parameter

CSB67_4-1738698299010.png

Testing Story

1. Open Story

2. Make changes in rows for different Cost Centers as highlighted.

CSB67_5-1738698405273.png

You will notice the button description has changed, now showing “Calc Cost Centers #2”
If you select the drop down, you can see a list of the Cost Center Id’s that have changed data.

3. Press the “Calc” button to execute the data action for only these two Cost Center’s.

CSB67_0-1738699848726.png

The Completed message will show the number of Cost Centers that were calculated.

4. From the System menu, select Job Monitor and select the data action that was executed.

CSB67_1-1738699931485.png

You will see the parameters that were passed to the data action for calculation.
The Cost Center description is shown in this window not the Cost Center Id.

Clear Logs

If the user wants to reset the change tracking for a planning session, they can

  1. Revert Data and
  2. Press the Clear Logs button, this will clear the global array.
  3. SAC will start tracking changes again with a clean slate.

 

 

 

 

 

 

 

3 Comments