on 05-16-2011 10:00 AM
Hi Friends,
I have two keyfigures KF1 and KF2 .
I want to write the formula i.e (KF1KF2)/Sum(KF1KF2).
This formula is to be applied depending on the Characteristic Material.
Please guide me the syntax of this formula.
Regards,
Girish
Hello,
PLease try this code:
DATA Z_COM TYPE 0COMP_CODE.
DATA Z_MAT TYPE 0MATERIAL.
DATA SUM1 TYPE F.
DATA MUL1 TYPE F.
FOREACH Z_MAT,Z_COM.
MUL1 = {KF1, Z_COM, Z_MAT}* {KF2, Z_COM, Z_MAT}.
SUM1= {KF1, Z_COM, Z_MAT}+ {KF2, Z_COM, Z_MAT}.
{KF3, Z_COM, Z_MAT} = MUL1/SUM1.
*KF3 is the third key figure where the results are stored.
ENDFOR.
Please let me know if you need any further help.
Thanks.
With regards,
Anand Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for ur valuable info.
Problem was resolved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
if you want to run your formula for each material and both key figures you use are filled, you do not need any loop.
The system calculates each formula for each data record.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.