on 01-28-2016 2:11 PM
Hi gurus,
Im working on script logic where i had to use *WHEN_REF_DATA = MASTER_DATA Statement.
Here my Prblem is with out *WHEN_REF_DATA = MASTER_DATA Statement logic execution taking 30 to 40 sec, with is it is taking 30 to 40 min.
why i have to use is. My planned quantity is Zero for some Products and I have inventory for those products. when i write script logic without this statement it is not considering empty product.
Planned Qty | Inventory | to Produce | |
Product | 20 | here any data is populating | |
Product1 | 10 | 20 | here is Ok |
Product2 | 10 | here is Ok | |
Product3 | 100 | here is Ok |
is there anyway without BADI/*WHEN_REF*
*XDIM_MEMBERSET MACHINE_GROUP = PAIRING
*XDIM_MEMBERSET TIME = %TIME_SET%
*XDIM_MEMBERSET CATEGORY = %CATEGORY_SET%
//*XDIM_MEMBERSET PLANT = 1003
*XDIM_MEMBERSET PRODUCT = P_NONE
*XDIM_MEMBERSET AUDITTRAIL = Input
*XDIM_MEMBERSET GRID=G_NONE
*WHEN_REF_DATA = MASTER_DATA
*WHEN PLANT
*IS 1003
*WHEN ACCOUNT
*IS TO_PAIRING
*REC(EXPRESSION = %VALUE% >= 0 ? (%VALUE% - ([ACCOUNT].[SFG],[PLANT].[1003],[MACHINE_GROUP].[NONE_MC_GROUP])):0,ACCOUNT = LONG)
*ENDWHEN
*ENDWHEN
*WHEN ACCOUNT
*IS LONG
*WHEN PLANT
*IS 1003
*REC(EXPRESSION = %VALUE% < 0 ? (%VALUE% - ([ACCOUNT].[TO_PAIRING],[PLANT].[1004],[MACHINE_GROUP].[PAIRING])):0,ACCOUNT = LONG1)
*REC(EXPRESSION = %VALUE% >= 0 ? (%VALUE%):0,ACCOUNT = SEAMING_TRANS,MACHINE_GROUP=SEAMING,PLANT=1003)
*ENDWHEN
*ENDWHEN
Please Suggest me...
Thank you in advance
PJR
Hi gurus,
Still looking for the solution.
Does Any one has same Issue?
Thank you.
PJR
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi PJR,
Considering your requirements and the fact that you NEED to consider empty values as zero, I think you are going to need to use either *WHEN_REF_DATA = MASTER_DATA or a BADI implementation.
Although it might not be clear at first sight, when you use MASTER_DATA, execution time in most cases is a 100 or 1000 times the execution time with TRANSACTION_DATA. The reason is you usually have data in the cube for only 1% or even less of the total of the dimensions members combination. If your cube has 6 dimensions and your scope has 20 members of each dimension, this results in 20^6 = 64 million combinations.
To optimize the code you should implement it as a BADI. If you cannot do it, try reducing the scope to the minimum you can using XDIM_MEMBERSET. Make sure to explicitly restrict all dimensions in your model.
Best Regards,
Luigi
For example, in your code you could try to restrict PLANT and ACCOUNT dimensions with XDIM_MEMBERSET. Naturally to do that you would have change scope before your second WHEN loop:
*XDIM_MEMBERSET MACHINE_GROUP = PAIRING
*XDIM_MEMBERSET TIME = %TIME_SET%
*XDIM_MEMBERSET CATEGORY = %CATEGORY_SET%
*XDIM_MEMBERSET PLANT = 1003
*XDIM_MEMBERSET PRODUCT = P_NONE
*XDIM_MEMBERSET AUDITTRAIL = Input
*XDIM_MEMBERSET GRID=G_NONE
*XDIM_MEMBERSET ACCOUNT = TO_PAIRING
*WHEN_REF_DATA = MASTER_DATA
*WHEN PLANT
*IS 1003
*WHEN ACCOUNT
*IS TO_PAIRING
*REC(EXPRESSION = %VALUE% >= 0 ? (%VALUE% - ([ACCOUNT].[SFG],[PLANT].[1003],[MACHINE_GROUP].[NONE_MC_GROUP])):0,ACCOUNT = LONG)
*ENDWHEN
*ENDWHEN
*XDIM_MEMBERSET ACCOUNT = LONG
*WHEN ACCOUNT
*IS LONG
*WHEN PLANT
*IS 1003
*REC(EXPRESSION = %VALUE% < 0 ? (%VALUE% - ([ACCOUNT].[TO_PAIRING],[PLANT].[1004],[MACHINE_GROUP].[PAIRING])):0,ACCOUNT = LONG1)
*REC(EXPRESSION = %VALUE% >= 0 ? (%VALUE%):0,ACCOUNT = SEAMING_TRANS,MACHINE_GROUP=SEAMING,PLANT=1003)
*ENDWHEN
*ENDWHEN
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.