cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

KF logic is not working as expected SAP IBP

reddyatoz
Explorer
0 Kudos
373

Hi All,

I have following KF logic, but it is not working as expected.

IF(("KF1@PL">1 AND "KF2@PL"!=0),"KF3@PL"+"KF4@PL",0)

Marinating KF=5, KF2=5, KF3=10 and KF4=20.

Here output must be 30 but system giving "0".

i have written same logic in different way

IF(("KF1@PL">1 AND "KF2@PL"=0),0,"KF3@PL"+"KF4@PL")

and maintained KF=5, KF2=5, KF3=10 and KF4=20.

it is giving output as "30" but when i maintain KF=0, KF2=0, KF3=10 and KF4=20 then also it is giving "30" as output.

can some one help me on where i am missing logic.

Br

Kumar

Accepted Solutions (1)

Accepted Solutions (1)

chris_topf
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Kumar,

I can see how the following logic gives 30 even when KF1=0, KF2=0, KF3=10 and KF4=20:

IF(("KF1@PL">1 AND "KF2@PL"=0),0,"KF3@PL"+"KF4@PL")

in the first check, KF1@PL is NOT > 1 (it is 0), so the first check fails and the "else" condition is used, which is 10+20. If the condition was OR and not AND, it would have given you 0.
I'm not sure why the first calculation gave the result of 0, from what you listed it seems like it should have evaluated to 30. Make sure to check the inputs for each KF and that they are what you want, meaning whether you are using the stored or calculated value of each KF.

Regards,
Chris

Answers (0)