cancel
Showing results for 
Search instead for 
Did you mean: 

SAP IBP Key Figure calculation with Nested If

former_member685858
Discoverer
0 Kudos

Hi,

We have Plan order calculation as below :-

PLANORDER=TOTALRECEIPT-MINTRANSPORT

If it is less than 1 then Null

PLANORDER@WKPRODLOC = IF(("TOTALRECEIPT@WKPRODLOC" - "MINTRANSPORT@WKPRODLOC") < 1,NULL,"TOTALRECEIPT@WKPRODLOC" - "MINTRANSPORT@WKPRODLOC")

Now requirement is :- to add one more condition

IF "STOCKINGNODETYPE" = 'N' AND "NETDEMAND@WKPRODLOC" > 0 then Null

Else

PLANORDER@WKPRODLOC = IF(("TOTALRECEIPT@WKPRODLOC" - "MINTRANSPORT@WKPRODLOC") < 1,NULL,"TOTALRECEIPT@WKPRODLOC" - "MINTRANSPORT@WKPRODLOC")

===================================================================================

STOCKINGNODETYPE is attribute

Can you suggest the full calculation formula please

regards

Safia

Accepted Solutions (1)

Accepted Solutions (1)

Irmi_Kuntze
Advisor
Advisor
0 Kudos

PLANORDER@WKPRODLOC =
IF( "STOCKINGNODETYPE" = ''N'' AND "NETDEMAND@WKPRODLOC" > 0, Null, IF( ("TOTALRECEIPT@WKPRODLOC" - "MINTRANSPORT@WKPRODLOC") < 1, NULL, "TOTALRECEIPT@WKPRODLOC" - "MINTRANSPORT@WKPRODLOC" ) )

Attention, around the N is not one double but two single quotes (without blank)

Answers (1)

Answers (1)

former_member685858
Discoverer
0 Kudos

Thanks Irmhild,

I already used double quotes but system gave me below error, Hence I had updated with single quote.

Also two bracket was also giving error after IF((, I have put now only one bracket.

Looks like issue resolved now, will do negative testing as well.

Thank you so much for your input.

Error details

Quote error "N"

Diagnosis

In the PLANORDER@WKPRODLOC calculation, the N key figure is used in the calculation expression. However, the N key figure is not selected as an input for the calculation.

Procedure

Correct the calculation by selecting the N key figure as an input of the calculation, or remove the N key figure from the calculation expression.