cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Using WHEN/ENDWHEN with RUNALLOCATION

Former Member
0 Likes
379

Hi gurus!

I'm trying to run the following:

*WHEN VERSION.PLAN

*IS Plan

*RUNALLOCATION 1

*IS Forecast

*RUNALLOCATION 2

*ENDWHEN

And it looks like it is always run for both allocations no matter the value of the property , ignoring *WHEN.

Can you please confirm if this is feasible or when running allocations WHEN/ENDWHENS are not allowed

Thanks a lot

/Laura

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Likes

Sorry, but you can't combine WHEN and RUNALLOCATION by design. Some workaround can be proposed, but you have to clearly explain the desired logic of your calculations. Please read

Vadim

Answers (2)

Answers (2)

Former Member
0 Likes

Hi Laura,

In BPC WHEN doesn't play a role of IF statement. It just creates a scope for REC statement.

If you want to bypass part of the code try using XDIM_SKIPNULLCHECK.

Regards,

Gersh

former_member186338
Active Contributor
0 Likes

In some cases FOR/NEXT can also work as IF...

Vadim

Former Member
0 Likes

Hello Laura,

When/Endwhen statement won't required while writing run allocations,I guess !!

Because in Allocation syntax itself we can mention source & Destination..

former_member186338
Active Contributor
0 Likes

I can imagine some scenario when conditional execution of runallocation can be required. For example in default.lgf you want to execute allocation for Forecast and do not execute at all for Actual. This case is unclear...