on 2015 Jun 14 9:24 PM
Hi Experts!
I faced the following problem in script logic:
I have to multiplication two different dimension section ()
The example:
Factor1:
REPSCENTER: BAS(TOTAL)
MATERIAL: DUMMY_MATERIAL
PRODUCT: BAS(TOTAL)
Factor2:
REPSCENTER: DUMMY_REPSCENTER
MATERIAL: BAS(TOTAL)
PRODUCT: BAS(TOTAL)
Outcome:
REPSCENTER: BAS(TOTAL)
MATERIAL: BAS(TOTAL)
PRODUCT: BAS(TOTAL)
AMOUNT: Factor1*Factor2
I tried this script, but after 15 minutes I got ABAP program error (insufficient memory)
*SELECT(%RESPCENTER_MA%),”[ID]”,REPSCENTER,”[SECTOR]=’TA’”) //select the relevant 30 respcenter
*XDIM_MEMBERSET RESPCENTER = “DUMMY_RESPCENTER”
*XDIM_MEMBERSET MATERIAL = BAS(TOTAL)
*XDIM_MEMBERSET PRODUCT = BAS(TOTAL)
*FOR %LOOP_TA_RESPCENTER% = %RESPCENTER_MA%
*WHEN RESPCENTER
*IS *
*REC(EXPRESSION=%VALUE%*([RESPCENTER].[ %LOOP_TA_RESPCENTER%],RESPCENTER=%LOOP_TA_RESPCENTER%))
*ENDWHEN
*COMMIT
*NEXT
The modell contain about 3 000 materials and 1 200 products. Sorry about the short example and the missing log, I only curious about there is a better way to handle this calculation in script logic.
Any ideas are welcome.
Thanks
Norbert
Request clarification before answering.
Hi Norbert,
Looking just at syntax of that script it seems like you can move FOR/NEXT loop inside *IS since *WHEN doesn't depend of FOR/NEXT variable. This should speed it up, but I doubt it will make result more meaningful.
Since you already restricted RESPCENTER to DUMMY_RESPCENTER in XDIM_MEMBERSET that *WHEN will use only that single RESPCENTER. It sounded like you needed only MATERUAL = DUMMY_MATERIAL in Factor1, but I don't see that restriction in your script.
So, before making this script running efficiently try making it running correctly on a smaller data set. Then we can try find efficient way of running it.
Regards,
Gersh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Norbert,
"I only curious about there is a better way to handle this calculation" - use *RUNALLOCATION!
Vadim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Norbert,
You need to scope better by specifying more dimensions using XDIM.
Andy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 11 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.