cancel
Showing results for 
Search instead for 
Did you mean: 

*WHEN_REF_DATA = MASTER_DATA Statement taking more time in execution

Former Member
0 Kudos
218

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 QtyInventoryto Produce
Product20here any data is populating
Product11020here is Ok
Product210here is Ok
Product3100here 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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi gurus,

Still looking for the solution.

Does Any one has same Issue?

Thank you.

PJR

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Thank You Luigi,

For your prompt Replay. i will change as you suggested and will test.

PJR