Showing results for 
Search instead for 
Did you mean: 

Executing different section of logic script based on if else condition

0 Kudos

Hi Team,

We have a scenario where user inputs forecasted Revenue and Cost let say in Accounts F_REV and F_COST respectively.

Now based on conditions we need to execute different section of scripts as explained below.

Condition 1: If F_REV>0 and F_COST>0 then execute one section of the script logic where the costs are calculated as (Driver cost/ driver revenue)* forecasted revenue

Condition 2: Else we will simply allocate the forecasted cost into the various cost accounts based on their share(Run allocation logic)

F_REV and F_COST are stored against INPUT data source and the calculated costs are stored against CALC data sources.

Can one please suggest how to achieve this using script logic? We are using BPC 11.1NW standard version on BW4HANA.



Accepted Solutions (0)

Answers (1)

Answers (1)

Active Contributor
0 Kudos

You can check for condition for value in WHEN/ENDWHEN REC statement:

*REC(EXPRESSION=%VALUE%>0 ? ... : ...

You can use nested ... ? ... : ...