on 09-24-2008 10:15 AM
Hello Forum,
I have Fiscal year and Groupaccount in my lead column of my Planning Layout, in BW-BPS
Fiscal year Grpac
2008 A
2008 B
2008 C=A-B
Here i need to subtract the values of A and B and store it to C. Can some one help me with writing the fox formula in order to solve it.
Regards,
KK
Is groupaccount keyfigure or characteristic?
If you want to get the difference of two keyfigures to be stored in other keyfigure for the same characteristic selections for all the keyfigures, fox code is very simple. Just keep 'keyfigure name' in fields to be changed, and in the fox code write
= - .
For more details of the syntax of fox code, press F1 in fox editor.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Bindu for your help,
regards,
KK
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Bindu,
Thanks for the code, Can you plz tell me whether this code will also work, Bcoz currently now i dont have any data to test.
DATA A TYPE GRPACT.
DATA B TYPE GRPACT.
DATA C TYPE GRPACT.
A = VARC(GRPA).
B = VARC(GRPB).
C = VARC(GRPC).
{IFIAMTPER,C} = {IFIAMTPER,A} - {IFIAMTPER,B}.
Here i am maintaining the values of GRPACT A and B seperately in Planning variables GRPA and GRPB.
regards,
KK
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Bindu,
Group account is an characteristic value, we are maintaining values for group accounts A and B seperately. we have only one keyfigure in the data column amtper, which brings in data for all the group accounts.
so i need to bring subtracted data for goup account c into KF AMTPER from grpaccounts A and B which is also maintained in KF AMTPER.
Plz suggest,
regards,
KK
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Fine, then keep groupaccount and keyfigure name in fields to be changed and give coding like this.
DATA amountA TYPE I.
DATA amountB TYPE I.
Foreach GroupAccount.
If GroupAccount = 'A'.
amountA = {kf,GroupAccount}.
Else.
If GroupAccount = 'B'.
amountB = {kf,GroupAccount}.
Endif.
Endif.
Endfor.
{kf,'C'} = amountA - amountB.
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.