Quantcast
Channel: SCN : Discussion List - SAP Planning and Consolidation, version for SAP NetWeaver
Viewing all articles
Browse latest Browse all 5414

LOOKUP *FOR *NEXT "syntax error".

$
0
0

Hello.

 

My system is BPC 10 NW,

 

I'm trying to do a Script to achieve the next logic:

 

I have two Models (Contracts & Planning). Contracts has the next data

 

ACCOUNT_RSTIMESIGNED_DATA
PRICEM22014.UNITS200
PRICEM22013.UNITS150
PRICEM2........

 

 

The other model (Planning) has the next data

 

 

ACCOUNT_RSTIMESIGNED_DATA
PERCENTAGEARENT2014.JAN0,5
PERCENTAGEARENT2014.FEB0,7
PERCENTAGEARENT.......
PERCENTAGEARENT2013.JAN0,6
PERCENTAGEARENT2013.FEB0,9
PERCENTAGEARENT........

 

 

And the result (in model Planning) I am looking forward is:

 

 

ACCOUNT_RSTIMESIGNED_DATA
PERCENTAGEARENT2014.JAN0,5
PERCENTAGEARENT2014.FEB0,7
PERCENTAGEARENT........
PERCENTAGEARENT2013.JAN0,6
PERCENTAGEARENT2013.FEB0,9
PERCENTAGEARENT........
PRICEM22014.JAN200
PRICEM22014.FEB200
PRICEM2...
PRICEM22013.JAN150
PRICEM22013.FEB150

 

The Script that I developed is the next but I get Syntax error in the line of *REC

 

//JAN, FEB ...

*SELECT(%MON_SEL%,MONTHNUM,TIME,LEVEL= MONTH)

 

 

//2014, 2015...

*SELECT(%YEA_SEL%,YEAR,TIME,LEVEL = YEAR)

 

 

*LOOKUP Contracts

  *FOR %YEA_ACT% = %YEA_SEL%

  *FOR %MON_ACT% = %MON_SEL%

  //TIM_2014.JAN, TIM_2014.FEB

  *DIM TIM_%YEA_ACT%.%MON_ACT%:TIME = %YEA_ACT%

  //ACS_2014.JAN, ACS_2014.FEB

  *DIM ACS_%YEA_ACT%.%MON_ACT%:ACCOUNT_RS = PRICEM2

  *NEXT

  *NEXT

*ENDLOOKUP

 

 

*WHEN ACCOUNT_RS

*IS PERCENTAGEARENT

  *FOR %YEA_ACT% = %YEA_SEL%

  *FOR %MON_ACT% = %MON_SEL%

  *WHEN TIME

  *IS %YEA_ACT%.%MON_ACT%

  //2014.JAN ..

  *REC(EXPRESION = LOKKUP(ACS_%YEA_ACT%.%MON_ACT%), ACCOUNT_RS = PRICEM2)

  *ENDWHEN

  *NEXT

  *NEXT

*ENDWHEN


Viewing all articles
Browse latest Browse all 5414

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>