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

BPC 10.0 Script Logic: Combination of *FOR *WHEN *LOOKUP

$
0
0

Hi experts,

 

I'm working on a requirement to copy values from one model to another and aggregate to values.

Basically my script looks like that:

 

...

*LOOPUP OTHER_MODEL

*DIM VERSION = VERSION

*DIM TIME = TIME

*FOR %LOOP_CST% = %COSTCENTER_SET%

*DIM CST_%LOOP_CST%: COSTCENTER = %LOOP_CST%

*NEXT

*ENDLOOKUP

 

*FOR %SEL_CST% = %COSTCENTER_SET%

     *WHEN COSTCENTER

     *IS = %SEL_KST%

          *WHEN COST_TYPE

          *IS = "CST_NA"

               *REC(EXPRESSION = LOOKUP(%SEL_CST%), COSTCENTER = [COSTCENTER].AGGR_LEVEL, CURRENCY = "CURR_NA")

          *ELSE

                *REC(EXPRESSION = LOOKUP(%SEL_CST%), COSTCENTER = [COSTCENTER].AGGR_LEVEL, CURRENCY = "EUR")

          *ENDWHEN

     *ENDWHEN

*NEXT

 

*COMMIT

 

Unfortunately, this is not working.

If I include the for-loop inside the when-loop it is working. However, the values are multiplied based on the number of records.

 

Is there another possibility to solve this issue?

Thanks in advance,

Benjamin


Viewing all articles
Browse latest Browse all 5414

Trending Articles



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