Showing results for 
Search instead for 
Did you mean: 

What is JF(...) instead of IF(...) formula in Key Figures

Active Participant
0 Kudos

If you go to the sample planning area SAPIBP1, you will notice, for example in the key figure "Local Demand Plan Qty Final" (FINALLOCALDEMANDPLANQTY), the following formula:


Why did SAP use JF(...) here instead of a conditional IF(...)? What is the difference?

Accepted Solutions (0)

Answers (2)

Answers (2)


Hello Vincent,

In the above calculation, if ADJLOCALDEMANDPLANQTY is null and IF is used instead of JF, the FINALLOCALDEMANDPLANQTY key figure would then be null. However, if JF is used, the calculation defaults to the value of the "else" condition, or key figure LOCALDEMANDPLANQTY, in the event that ADJLOCALDEMANDPLANQTY is null.

So instead of using ISNULL to check if the input key figure is null or not, and then checking if it is >= 0, you can kind of combine the two checks.

JF may not be the best choice in all occasions, if for example you want to calculation to default to something else should the input (i.e. ADJLOCALDEMANDPLANQTY) be null.

JF is explained on this help portal page:


Active Participant

The JF statement will yield the else part in the event that the key figure used for the condition is null, whereas the IF statement will yield null when the condition key figure is null.


KF1 = null

if ( kf1>0, kf2, kf3) --> this will return null when you use if statement

jf( kf1>0, kf2, kf3) --> this will return kf3


Manikandan Shanmugam