cancel
Showing results for 
Search instead for 
Did you mean: 

SAP BPC - Script Logic - IF AND - How to manage more than one condition ?

camille_chenon
Explorer
0 Kudos
1,048

Hello experts,

I'm trying to find a way to use the expression EXPRESSION = ( (A>B) ? C : D, value = E), but with multiple conditions instead of one ? Is it a knowing code ?

Basic Exemple. Conditions :

If A>B & D>C than E

If A<B & D<C than F

else : Nothing

Also, do you know how to do post "nothing" using this condition ? Meaning if condition 1 = true than Account = E, if condition 2 = true than Account = F else nothing.

Thanks a lot in advance experts !

Camille

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member186338
Active Contributor
0 Kudos

Multiple conditions can be created using:

&& - AND

|| - OR

To post nothing you can post target tuple

*REC(EXPRESSION=(%VALUE%>0 && [ACCOUNT].[ACCT1]<1000) ? %VALUE% : [ACCOUNT].[ACCT2], ACCOUNT=ACCT2)

Also, posting 0 can be fine for nothing

*REC(EXPRESSION=(%VALUE%>0 && [ACCOUNT].[ACCT1]<1000) ? %VALUE% : 0, ACCOUNT=ACCT2)

*REC(EXPRESSION=(%VALUE%<0 && [ACCOUNT].[ACCT1]>1000) ? %VALUE% : 0, ACCOUNT=ACCT2)
camille_chenon
Explorer
0 Kudos

Fantastic ! I tried & but not double &&

it works fine now,

Thank you Vadim !

Camille

former_member186338
Active Contributor
0 Kudos

camille_chenon

Please accept the correct answer.