on 2021 Aug 12 11:33 AM
Hi Friends,
BPC standard 10.1
We have a script that calls a badi to perform some calculations. These calculations run every couple of hours throughout the close. The output is fed to the dashboard. The results are accurate but I am looking at ways to reduce the time taken for calculations. The Model has regular dimensions together with Material. Material dimension is huge with lot of granularity which increase the record count processed by the script/badi. The Dashboard does not use material dimension.
Is it possible to merge all the materials to one single element like - "total_materials" in the script and then pass it to badi to reduce the number of records processed.
We don't want to create duplicate data in the model, as it used for management/external reporting and copying over data every couple of hours, in another overhead.
*XDIM_MEMBERSET CATEGORY = ACTUAL
*XDIM_MEMBERSET TIME = YYYY
*XDIM_MEMBERSET CURRENCY = USD
*XDIM_MEMBERSET ACCOUNT = BAS(XXXX)
*START_BADI ZCALC_VARIANCES
QUERY = ON
WRITE = ON
*END_BADI
Request clarification before answering.
To my mind your main issue is related to inefficient badi code! Please ask a good ABAP developer to check the code.
For sure it's possible to merge materials to the single member:
*XDIM_MEMBERSET MATERIAL = BAS(ROOT_MATERIAL_PARENT)
*WHEN MATERIAL
*IS *
*REC(EXPRESSION=%VALUE%, MATERIAL=total_materials)
*ENDWHEN
*XDIM_MEMBERSET MATERIAL = total_materials //scope only single member
*XDIM_MEMBERSET CATEGORY = ACTUAL
*XDIM_MEMBERSET TIME = YYYY
*XDIM_MEMBERSET CURRENCY = USD
*XDIM_MEMBERSET ACCOUNT = BAS(XXXX)
*START_BADI ZCALC_VARIANCES
QUERY = ON
WRITE = ON
*END_BADI
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Vadim.
When I implemented the badi, it used to run in 12secs for a month. Over the course of time, with increasing data ( due to inclusion of revenue recognition module in ecc) and more granular master data for Materials, the process slowed down considerably.
Does the code duplicate the data. As point of reference, I might be looking at a million records to move to total_materials.
*XDIM_MEMBERSET MATERIAL = BAS(ROOT_MATERIAL_PARENT)
*WHEN MATERIAL
*IS *
*REC(EXPRESSION=%VALUE%, MATERIAL=total_materials)
*ENDWHEN
total_materials member will be outside of material hierarchy - thank you.
Or do you want to completely remove material info - I am not sure if I can remove the material info, is it possible?. as the output should have some member associated with Material, as its a part of the model.
I will test out the rec logic, sometimes rec statement takes a lot of time, depending on the number of input records.
sap.user62
"I can remove the material info, is it possible?."
*XDIM_MEMBERSET MATERIAL = BAS(ROOT_MATERIAL_PARENT)
*WHEN MATERIAL
*IS *
*REC(EXPRESSION=%VALUE%, MATERIAL=total_materials)
*REC(EXPRESSION=0) //to remove particular material value!
*ENDWHEN
"I will test out the rec logic, sometimes rec statement takes a lot of time"
That's the reason why I told you to check and improve badi code...
User | Count |
---|---|
5 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
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.