Skip to Content

Running multiple logic scripts in a same package

Hi

This post may appear duplicate but the post by the same topic does not answer my query.

I have created multiple logic scripts grouping 3 sales group members into one by property in dimension Sales group. In the package only 1st task runs while the rest do not. There's no difference in code of other tasks except for having 3 more sales group members grouped by property %SG_VAR%.

The code is as follows:

*SELECT(%TIME_VAR%,"[ID]",TIME,"[YEAR]='2014' AND [LEVEL]='MONTH'")

*SELECT(%SG_VAR%,"[ID]",SALES_GROUP,"[GROUPING]='Z1'")

//To scope all RM with BOM_VOL

*XDIM_MEMBERSET VERSION=ACTUAL

*XDIM_MEMBERSET METRICS=BOM_VOL

//*XDIM_FILTER PRODUCT_RM=[PRODUCT_RM].PROPERTIES("MAT_TYPE")= "ZPPK","ZSPK","ZING"

*XDIM_MEMBERSET PRODUCT_RM=<ALL>//Since all MAT_TYPE are to be queried other than NO_RM since SAL_VOL resides there.

*XDIM_MEMBERSET TIME=2013.09 //This has to user-prompt in DM pack.. later

//for each RM with BOM_VOL, multiply with SAL_VOL of the same record's product_sku

//for each time period and write to the same time period

*FOR %LOOP_SG%=%SG_VAR%

*FOR %LOOP_TIME%=%TIME_VAR%

*WHEN PRODUCT_RM

*IS <>NO_RM

*REC(EXPRESSION=([VERSION].[BUDV0_2014],[METRICS].[SAL_VOL],[PRODUCT_RM].[NO_RM],[UOM].[CS],[TIME].[%LOOP_TIME%],[SALES_GROUP].[%LOOP_SG%])*%VALUE%,VERSION="BUDV0_2014",TIME=%LOOP_TIME%,METRICS="COGS_VOL",SALES_GROUP=%LOOP_SG%)

*ENDWHEN

*NEXT

*NEXT

While I used *INCLUDE to include the other logic scripts, it's very slow. Can't we run multiple scripts in the same package?

Regards,
Draksharam

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Jan 23, 2014 at 12:19 PM

    Hi,

    The reason why I created multiple logic scripts is because of the large *WHEN/ENDWHEN statements created when looping through all members of %sales_group% variable. So I grouped 3 members of sales group per script and included them as different tasks in the same package so that the user just runs it once.

    Regards,

    Draksharam

    Add a comment
    10|10000 characters needed characters exceeded

    • Vadim Kalinin draksharam Mandavilli

      Hi Draksharam,

      "RUN_LOGIC:Error obtaining concurrency lock (enqueue_server_busy)" means that different scripts are trying to write to the same destination intersection of members. You have to split scope somehow to avoid this issue. Please read the provided How-To and implement the badi.

      B.R. Vadim

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.