on 08-05-2010 3:58 PM
Hello experts,
I have a simple macro in an SNP planning book assigned to a button. The user can press this button any time to run the macro. I want to avoid that the macro is executed if the planning book is in "Display" mode, meaning the macro should only run if the planning book is in "Change" mode". I couldn't find a respective macro function in SAP's SCM library ... any idea here ?
Regards
Thomas
Hi,
There is no direct macro function to check planning book is change or display mode.
But you can try with macro function DATA_IS_LOCKED()
DATA_IS_LOCKED returns the value 1, if the data is locked for the current user, meaning they can edit the data. It returns the value 0, if the data is locked by another user, meaning the current user cannot edit the data.
.
Regards,
Sunitha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi !
This answer was also very useful to me in correcting the macro to behave the way we wanted and generate a message.
I have one more requirement.
Is it possible to select all the objects by the macro when it is run by the user.
Thank you in anticipation.
Tarak Shah
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thomas,
I checked, unfortunately we donot have a function to verify cell is editable or not.
However, pls try below function.
CALC_ERROR
CALC_ERROR returns the value X if an error has occurred during execution of the macro.
-
Check if macro returs 'X' in case of execution in display mode.
Best Regards,
Deepthi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
If no macro function is available, may be you can try option of giving a message(Ex:This function is only possible in change mode) by checking whether planning book cells are editable or grayed out.
Best Regrads,
Deepthi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
9 | |
4 | |
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.