cancel
Showing results for 
Search instead for 
Did you mean: 

SAP BPC 10MS - PROBLEM WITH SCRIPT LOGIC CALCULATION

Former Member
0 Kudos

Hello SAP Expert,

I’m trying (SAP BPC 10 MS) to perform the following calculation with SCRIPT Logic and I’m having some problems.

Basically what I want to achieve is to have YYYY.Q1 + YYYY.Q2 + YYYY.Q3 (ACTUALS) = YYYY.Q4 (FORECAST). I need to peform this for all years.

In my TIME dimension I have the properties PERIODS (with indicates for each ID Q1, Q2, Q3, Q4, JAN, FEB, MAR, etc) and the property YEAR as well.

In the script logic I have:

*SELECT (%Q1%,[ID],TIME, “PERIODS = Q1")

*SELECT (%Q2%,[ID],TIME," PERIODS = Q2")

*SELECT (%Q3%,[ID],TIME," PERIODS = Q3")

*SELECT (%Q4%,[ID],TIME," PERIODS = Q4")

*XDIM_MEMBERSET CATEGORY = ACTUALS

*WHEN CATEGORY

*IS ACTUALS

*WHEN TIME

*IS %Q1%,%Q2%,%Q3%

*REC(FACTOR = 1, CATEGORY = FORECAST, TIME = %Q4%)

*ENDWHEN

*ENDWHEN

*COMMIT

The problem that I’m having is that the system does not understand where the value must be stored. In NW version a similar procedure use to work for me.

Do you have any suggestion?

Thanks you!

Accepted Solutions (1)

Accepted Solutions (1)

cecilia_petersson2
Active Participant
0 Kudos

Hi Luis,

Try something like this, i.e. add the SELECT statement and replace your REC statement with the FOR-NEXT loop below.

*SELECT(%ALL_YEARS%,"[YEAR]","TIME")

*WHEN TIME
*IS %Q1%,%Q2%,%Q3%
*FOR %MY_YEAR% = %ALL_YEARS%
*WHEN TIME.YEAR
*IS %MY_YEAR%
*REC(FACTOR = 1/3, TIME = %MY_YEAR%.OCT, CATEGORY = FORECAST, NOADD)
*REC(FACTOR = 1/3, TIME = %MY_YEAR%.NOV, CATEGORY = FORECAST, NOADD)
*REC(FACTOR = 1/3, TIME = %MY_YEAR%.DEC, CATEGORY = FORECAST, NOADD)
*ENDWHEN
*NEXT
*ENDWHEN

/Cecilia

Answers (0)