on 2016 Mar 11 4:14 PM
Hi Guys,
I have a case with a simple calculation on about 15 million records. Basically, the average of two members should go to a third member. So we have when/endwhen statement with REC=0.5.
The system on which I work is BPC 10.1 NW SP01/AnyDB (I know, it is for ramp-up...).
As you may expect I am experiencing tsv_tnew_page_alloc_failed dump.
I tried to use *XDIM_MAXMEMBERS, but from the limited experience, I had it was not helping. I think it is not releasing the internal table with each iteration.
For that reason, I am doing the calculation with *FOR/NEXT loop which is making 25-27 When/Endwhen iterations based on members from one of the dimensions.
The question I have is, in which step the internal table is released/truncated?
From my feelings, Maxmembers is querying the data based on the defined slices, making the calculations and keeping the results in the internal table. However, the internal table is growing until all the slices are calculated.
What are your experiences and do you know more intelligent way of spreading and keeping the internal table low?
Regards,
Emiliyan
Request clarification before answering.
Hi Guys,
Finally, the script which worked for me was the following. I was not able to use XDIM_PACKAGEBY for an unknown reason. Most probably due to lower ramp-up SP level.
As Vadim suggested, RUNLOGIC_PH will help to decrease the time this script currently takes to run.
//Selecting Base Members
*SELECT (%BASEMEMBERS%, [ID], DIMENSION, CALC = N)
//Looping through all Selected members
*FOR %VAR_ID% = %BASEMEMBERS%
*WHEN DIMENSION
*IS %VAR_ID%
*REC(FACTOR = 0.5, DIMENSION = MEMBER)
*ENDWHEN
*NEXT
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Emeliyan,
First of all, PACKAGEBY doesn't work with RUNALLOCATION; your initial question was about WHEN/ENDWHEN.
My understanding of that script this script is it erasing all data in the Model. It would be easier just to drop data from the cube. This script will work forever on your 15M records.
If you still want to use something similar I'd suggest looping on all sub nodes of the top node or run each FOR/NEXT loop on some property. RUNALLOCATION commits data after every END....
This will take reasonable time and should not run out of memory.
Regards,
Gersh
Hi Emiliyan,
Yes, WHEN/ENDWHEN has to keep all resulting data in memory in case records from separate batches produce record with same key - then it adds them up. Therefore *XDIM_MEMBRSET is useful when you have a big source set and a small resulting set of records.
You can also try *XDIM_PACKAGEBY. Similarly to RUNLOGIC it writes back each batch of data independently.
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 Emiliyan,
Please try RUNLOGIC_PH badi How To Implement the RUNLOGIC_PH Keyword in SAP... | SCN
Vadim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 7 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.