Skip to Content
author's profile photo Former Member
Former Member

REC Statement with IIF

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Dec 30, 2011 at 11:45 AM

    place *WHEN_REF_DATA = MASTER_DATA at the beginning .Try this statement with 1 st code . Do not try with 2 ed code . it has lot of syntax errors.

    *WHEN_REF_DATA = MASTER_DATA
    *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].[CPLCLPTCOSA]>0 )*([P_ACCT2].[CPLCLPTCOO]+[P_ACCT2].[CPLCLPTCOTOTP]-[P_ACCT2].[CPLCLPTCOTOTOF]) +  ([P_ACCT2].[CPLCLPTCOSA]<0 )* (calculation if there is no value in CPLCLPTCOSA)  ,P_ACCT2="CPLCLPTCOO",TIME=TIME.NEXT)
    *ENDWHEN
    *COMMIT
    *NEXT
    

    Hope this helps.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.