on 04-29-2015 8:51 PM
Hello Experts,
This is my first post in SAP world.
I want to write a macro that can make any cell of the given key-figure uneditable.
The Context/Purpose:
copy data of one key-figure to another and lock the first period (or any intended period 1 or 2 or 3 or n) cell to be locked i.e. uneditable by the planner.
I could write the simple macro that copies the data from the desired KF to another desired KF but I am not able to make the "Future p1" period cell for "KF3" (newly populated key-figure) uneditable ir. frozen.
In another such case I want to freeze "Future p1 p2 p3 p4" also.
Macro: copy forecast step: copy kf2 to kf3 (iterations: hist p1 to hist p5) row: kf3 (iterations: future p1 to future p6) row: kf2 |
hist p1 | hist p2 | hist p3 | hist p4 | hist p5 | future p1 | future p2 | future p3 | future p4 | future p5 | future p6 | |
---|---|---|---|---|---|---|---|---|---|---|---|
kf1 | 1 | 2 | 3 | 4 | 5 | ||||||
kf2 | 1.1 | 2.2 | 3.1 | 4.1 | 5.1 | 6 | |||||
kf3 | 1.1 | 2.2 | 3.1 | 4.1 | 5.1 | 6 |
Problem in nutshell:
1. Copy data from kf2 to kf3 and freeze future p1.
2. Copy data from kf2 to kf3 and freeze future p1 p2 p3 p4 .
Thanks.
Harshad M.
Hello,
You can use macro function cell_input(). Please refer to the below online help.
Planning Table Functions and General Functions - Operators and Functions in Macros - SAP Library
Notice that you must set the "Change Scope" to "Attribute Change".
You can refer to my document http://scn.sap.com/docs/DOC-47359
Best Regards,
Ada
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Ada Lv,
This should work, but when it comes to multiple buckets cell_input() have the limitation that it is valid only for a single cell as far I think.
So in second scenario how to give the pass reference of multiple (4 in our case) periods to the cell_input() i.e. how to make cell_input() work for multiple periods.
Regards,
Harshad M. 🙂
I also have one more question.
How do we conditionally execute any step in the macro.
Ex. I want to freeze few columns IF nothing is highlighted while the macro is being executed in Foreground. But IF anything is highlighted before start of execution then kf1 should copy to kf2 for the highlighted periods.
Thanks.
Harshad M 🙂
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
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.