Former Member
May 30, 2013 at 10:47 PM

# Script logic with member formulas, sap bpc 10 for ms

351 Views

Hello Experts, following you will find a problem i have to calculate through a script logic some dimension members.

CONSIDERATIONS

1. In dimension ACCOUNT i have three members used to calculate some interest:[income]=[rate] * [volume]

2. Member [volume] is a calculated member with formula: [BOP] + [start] + [new] - [attrition]

3. Member [start] is a calculated member with formula: 'Iif(TIME.CURRENTMEMBER.PROPERTIES("PERIOD") = "JAN",([ACCOUNT].[BOP],[Time].CurrentMember),([Cuentas_Banco].[volume],[Time].PrevMember))

4. The calculation regarding to [volume] perfoms as expected in input schedule and reports THE PROBLEM

1. When i try to run a script logic to calculate [income] for the year, (example, Jan to Dec 2013), i could find that its imposible to obtain the value of member [volume] because it's a calculated member, so its zero always

2. I try to write a script logic where i try to do the same calculation as the member formula [volume] but its no way to obtain the correct calculus.

SCRIPTLOGIC

*WHEN CUENTAS_BANCO

*IS "income"

*WHEN TIME.PERIOD

*IS "JAN"

*REC (EXPRESSION=((GET(CUENTAS_BANCO="BOP") + GET(CUENTAS_BANCO="Start") + GET(CUENTAS_BANCO="New") - GET(CUENTAS_BANCO="Attrition")) * GET (CUENTAS_BANCO="rate")/365*30*-1),CUENTAS_BANCO="income")

*ELSE

*REC (EXPRESSION=(GET(CUENTAS_BANCO="BOP",TIME=PRIOR(1)) + GET(CUENTAS_BANCO="start",TIME=PRIOR(1)) + GET(CUENTAS_BANCO="new",TIME=PRIOR(1)) - GET(CUENTAS_BANCO="attrition",TIME=PRIOR(1)) + GET(CUENTAS_BANCO="new")-+ GET(CUENTAS_BANCO="attrition")) * GET (CUENTAS_BANCO="rate")/365*30*-1),CUENTAS_BANCO="income")

*ENDWHEN

*ENDWHEN

*COMMIT

HELP

I would appreciate if some one can help me to find a way to replicate the same calculation for [volume] or [income] but in scriptlogic. Thanks!

Attachments

tabla.jpg (24.5 kB)