Skip to Content
0
Former Member
Jul 10, 2014 at 06:41 AM

SCRIPT LOGIC Error

22 Views

Dear experts,

I want to copy for some accounts from one flow to other , for ex, : if my opening value for some account it greater than zero (0) , copy it to inverse flow into the same account.

I referred Link and wrote a below simple code :

*XDIM_MEMBERSET CATEGORY=PLAN

*XDIM_MEMBERSET P_DATASRC=MANUAL

*XDIM_MEMBERSET P_ACCT = BAS(1010300000)

//*XDIM_MEMBERSET P_MATERIAL=BAS(All_MAT)

*XDIM_MEMBERSET P_EMP_TYPE=NA

*XDIM_MEMBERSET P_PROJECT=NA

*XDIM_MEMBERSET P_SERVICES=NA

//*XDIM_MEMBERSET P_CC=BAS(ABCD)

*XDIM_MEMBERSET P_ASSET=NA

//*XDIM_MEMBERSET TIME =%TIME_SET%

//*XDIM_MEMBERSET FLOW= F_120,F_INV

*SELECT(%O%, "[ID]", FLOW, "[ID]='F_100'")

*SELECT(%A%,ID,FLOW,"ID='F_120'")

*SELECT(%D%,ID,FLOW,"ID='F_130'")

*SELECT(%M%,ID,FLOW,"ID='F_410'")

*SELECT(%C%,ID,FLOW,"ID='F_999'")

*SELECT(%IN%,ID,FLOW,"ID='F_INV'")

*XDIM_MEMBERSET FLOW = %O%,%A%,%D%,%M%,%C%,%IN%

//Inverse Flow calculation

*FOR %M1% = %TIME_SET%

*XDIM_MEMBERSET TIME=%M1%

*WHEN P_ACCT

*IS BAS(1010300000)

*WHEN FLOW

*IS %O%

*REC(EXPRESSION= (%VALUE% <= 0) ? 0 : [FLOW].[%IN%] )

*ENDWHEN

*ENDWHEN

*NEXT

*COMMIT

But when I run the data manager package we get error saying either syntax error or unknown dimension flow.

1) How to handle iif statement in the rec statement

2) Actually our requirement is as below :

We have flows like opening , addition , deductions , minimum stock balance, closing and one more INV

Business users are going to plan inventory consumption and min stock balance , addition should be auto calculated.

Steps Involved :

A) Copy all the openings into a INV flow whose values are greater than zero ( 0 ) .

So in order to get this, first I have taken one flow extra as INV , with the above logic I am transferring those openings whose values in greater than zero (0)



B) IF ( deductions + minimum stock - INV is greater then 0 then addition = deductions + minimum stock - opening stock )

ELSE

( addition = 0 )


For second step, we have to developed other script.

But since we are facing issues in IF statement, we are about to develop it.

Would appreciate your inputs.

Regards,

SAP BPC