on 10-03-2023 4:09 PM
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:
FINALLOCALDEMANDPLANQTY@WKPRODLOCCUST = JF("ADJLOCALDEMANDPLANQTY@WKPRODLOCCUST">=0, "ADJLOCALDEMANDPLANQTY@WKPRODLOCCUST", "LOCALDEMANDPLANQTY@WKPRODLOCCUST")
Why did SAP use JF(...) here instead of a conditional IF(...)? What is the difference?
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: https://help.sap.com/viewer/e8e6c8142e60469bb401de5fdb6f7c00/latest/en-US/5411085513174ffd9fd202d3a2...
Regards,
Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
13 | |
2 | |
1 | |
1 | |
1 | |
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.