cancel
Showing results for 
Search instead for 
Did you mean: 

prevent data save in interactive planning

Former Member
0 Kudos

Hello together,

I have the issue, that I want to prevent the saving of data in interactive planning, if for example a keyfigure has not the correct value.

For this I crated a macro to check the value of the keyfigure. I put it as an 'END' - Macro, so everytime user tries to save data, the check is running first.

So my question, Is there any standard functionallity that I can use to prevent the data save?

Or is there any global parameter, which I can change via a function module used in this macro, to prevent the data save?

I'm pleased for any help I can get to solve this issue.

Thanks and best regards

Björn

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member187488
Active Contributor
0 Kudos

Hi,

There's no standard functionality to prevent the saving of data. Generally upon saving, every changed data would be saved to liveCache.

So the idea would be, check every changed data upon saving by a BADI/User-Exit macro. It's a good idea to put the macro into Exit group, or in Default group, dependent on your requirement.

In the macro, you should check table C_T_TAB_OLD[], in which the old value of the changed data are saved. Unchanged data and the new value of the changed data are saved in table C_T_TAB[]. So you can loop at table C_T_TAB_OLD[], and just the value in C_T_TAB[] for the same line and column. If the value in table C_T_TAB[] is incorrect according to your condition, you should set the C_T_TAB[] value back to the old one and delete the corresponding entry in C_T_TAB_OLD[] (in case the requirement is to set back to the old value if the new value is incorrect).

Please refer to note 1119651 for BADI macro creation.

Best Regards,

Ada

satish_waghmare3
Active Contributor
0 Kudos

Hello Bjorn

I understand you want to prevent Saving of data if any invalid or incorrect value being entered by the user in a particular key figure in the planning book.

You did not specify, What all possible incorrect or invalid values for the key figure?

Instead of checking of incorrect values at the time of SAVE, I suggest you to check immediately after value is being entered by user, Because this will also tell user which incorrect entry and where it exist in data view table. For this you will need to be run Macro on Default event. Please think about it.

Sample macro which validate data entry less than zero -  If negative value entered into Forecast KF then value will be reset to zero and color of the cell will be changed to Red color.

Hope this will help you.

Thank you

Satish Waghmare