Skip to Content
0
Former Member
Dec 30, 2011 at 11:05 AM

REC Statement with IIF

59 Views

Hi experts,

We are using SAP BPC 7.5 SP08. I have written a script logic wherein, i am dynamically populating the opening balance(CPLCLPTCOO) to the next month

*FOR %TIM_MEM%="2011.AUG","2011.SEP","2011.OCT","2011.NOV","2011.DEC","2012.JAN","2012.FEB","2012.MAR","2012.APR","2012.MAY","2012.JUN","2012.JUL"

*XDIM_MEMBERSET TIME =%TIM_MEM%

*WHEN P_ACCT2

*IS CPLCLPTCOSA

*REC(EXPRESSION=[P_ACCT2].[CPLCLPTCOO]+[P_ACCT2].[CPLCLPTCOTOTP]-[P_ACCT2].[CPLCLPTCOTOTOF],P_ACCT2="CPLCLPTCOO",TIME=TIME.NEXT)

*ENDWHEN

*COMMIT

*NEXT

This code is working fine. However the problem comes when the user does not give any value in the input schedule for the member CPLCLPTCOSA in one month but gives it for subsequent months. For this i tried modifying the scipt logic as

*FOR %TIM_MEM%="2011.AUG","2011.SEP","2011.OCT","2011.NOV","2011.DEC","2012.JAN","2012.FEB","2012.MAR","2012.APR","2012.MAY","2012.JUN","2012.JUL"

*XDIM_MEMBERSET TIME =%TIM_MEM%

*REC(EXPRESSION=IIF([P_ACCT2].[CPLCLPTCOSA]=0,[P_ACCT2].[CPLCLPTCOO][P_ACCT2].[CPLCLPTCOTOTP]-[P_ACCT2].[CPLCLPTCOTOTOF],[P_ACCT2].[CPLCLPTCOO][P_ACCT2].[CPLCLPTCOTOTP]-[P_ACCT2].[CPLCLPTCOTOTOF]),P_ACCT2="CPLCLPTCOO",TIME=TIME.NEXT)

*COMMIT

*NEXT

However, this code doesnot work as it is giving a validation error "Invalid dimemnsion name "[P_ACCT2].[CPLCLPTCOSA" in application PLANNING"

Can you please help me out on how i can include an IIF statement in a REC statement.

Thanks in advance

Edited by: Appu Del on Dec 30, 2011 4:36 PM