Skip to Content
0
Former Member
Jun 22, 2010 at 09:23 PM

Error in Logic when and endwhen

78 Views

Hi Experts,

My logic is erroring at (UJK_VALIDATION_EXCEPTION:Invalid when/endwhen: Line #25 : Invalid when/end) which is ENDWHEN LOOKUP(PPO)

*XDIM_ADDMEMBERSET ACCOUNT_CMP = AC.RECEIPTS,AC.PRODVOL,AC.RAWMATERIALS

*XDIM_MEMBERSET RPTCURRENCY = <ALL>

*XDIM_MEMBERSET GEOGRAPHY = <ALL>

*XDIM_MEMBERSET COMPANY = <ALL>

*XDIM_MEMBERSET PROFITCENTER = <ALL> //EXPAND SCOPE FOR RECEIPTS RECORDS

*LOOKUP OCD

*DIM PPO:DATASRC="MANUAL"

*DIM PPO:COMPANY = "CC.NOCOMPANY"

*DIM PPO:CUSTOMER = "NO_CUSTOMER"

*DIM PPO:PLANT = "NO_PLANT"

*DIM PPO:GEOGRAPHY = PRODUCT.RCVGEO

*DIM PPO:PROFITCENTER = PRODUCT.PROFITCENTER

*DIM PPO:RPTCURRENCY = "LC"

*DIM PPO:ACCOUNT_CMP = "AC.PURCHPRICE"

*ENDLOOKUP // OCD

*WHEN ACCOUNT_CMP

*IS AC.RECEIPTS

*WHEN LOOKUP(PPO)

*IS <>0 //PPO MUST BE <> 0 TO USE FOLLOWING CALC

*REC(ACCOUNT_CMP = AC.PURCHPRICEVAR,DATASRC=MANUAL,RPTCURRENCY="USD",EXPRESSION=%VALUE% * (LOOKUP(PPO) - GET(ACCOUNT_CMP="AC.RAWMATERIALS",DATASRC="MANUAL",GEOGRAPHY="NO_COUNTRY",RPTCURRENCY="LC")))

*ELSE

*REC(ACCOUNT_CMP = AC.PURCHASEPRICEVAR,DATASRC=MANUAL,RPTCURRENCY="USD",EXPRESSION=0)

*ENDWHEN LOOKUP(PPO) //PPO <> 0

*IS AC.PRODVOL

*REC(ACCOUNT_CMP=AC.TEMPMFGSCRAP,DATASRC=MANUAL,FACTOR=GET(ACCOUNT_CMP="AC.RAWMATERIALS",DATASRC="MANUAL",GEOGRAPHY="NO_COUNTRY",RPTCURRENCY="LC",COMPANY="CC.NOCOMPANY"))

*ENDWHEN //ACCOUNT_CMP

*COMMIT

Currently we are in BPC NW 7.0

Thanks in advance

Reg

Ram