cancel
Showing results for 
Search instead for 
Did you mean: 

Advanced Dynamic Script failed to launch Logic Script

former_member200880
Participant
0 Kudos

Dear All

I am trying to call a logic script for top down allocation. For which there are user prompts to select entity, time dimension, besides that we are providing a combobox with certain property in Product dimension.

We are passing these parameters to script logic. After reading SCN blogs, we got to know that a script  logic can  be invoked thru a process chain.

We have choosen FX_restatement process. But the package fails with the following error. Let me know if any other process chain to be used.  Totally 3  parameters needs to goto the logic script. i.e entity, time and a property of product dimension using a combobox.

Could you please assist us.?

Error in Package status....

[Selection]

--------------------------------------------------------------

SELECTION = /BPCDEMO/MT_PLANNING/PRIVATEPUBLICATIONS/MTHADANI/TempFiles/FROM.TMP@@@SAVE@@@@@@EXPAND@@@|DIMENSION:MT_ENTITY|3001_PC3|DIMENSION:TIME|2015.08

COMBOBOX = LEVEL1

[Message]

-------------------------------------------------------------

Failed to analyze instruction /CPMB/FX_RESTATEMENT_LOGIC,LOGICFILENAME,MT_ALLOC_

model: MT_PLANNING. Package status: RUNNING

Advanced dynamic script..

PROMPT(SELECTINPUT,,,,"%ENTITY_DIM%,CURRENCY_DIM%,%TIME_DIM%")

PROMPT(COMBOBOX,%COMBOBOX%,"Select Level:",0,LEVEL0,{LEVEL0,LEVEL1,LEVEL2,LEVEL3}]

INFO(%EQU%,=)

INFO(%TAB%,;)

TASK(/CPMB/FX_RESTATMENT_LOGIC,SUSER,%USER%)

TASK(/CPMB/FX_RESTATMENT_LOGIC,SAPPSET,%APPSET%)

TASK(/CPMB/FX_RESTATMENT_LOGIC,SAPP,%APP%)

TASK(/CPMB/FX_RESTATMENT_LOGIC,SELECTION,%SELECTION%)

'TASK(/CPMB/FX_RESTATEMENT_LOGIC;REPLACEPARAM,COMBOBOX%EQU%%COMBOBOX%)

TASK(/CPMB/FX_RESTATEMENT_LOGIC,LOGICFILENAME,MT_ALLOC_LG.LGF)

Logic script :

*XDIM_MEMBERSET MT_ACCOUNT = PL010

*XDIM_MEMBERSET MT_RPTCURRENCY = %RPTCURRENCY_SET%

*XDIM_MEMBERSET MT_ENTITY = %ENTITY_SET%

*XDIM_MEMBERSET TIME = %TIME_SET%

*SELECT(%PRODSET%,"ID",MT_PRODUCT,"GROUP='$COMBOBOX$'")

*FOR %PROD% = %PRODSET%

    *FOR %TIME% = %TIME_SET%

        *RUNALLOCATION

            *FACTOR = USING/TOTAL

            *DIM MT_CATEGORY WHAT = Plan;        WHERE = Plan;        USING = Actual;            TOTAL = <<<;

            *DIM MT_PRODUCT  WHAT = %PROD%_ND; WHERE = BAS(%PROD%); USING = <<<;               TOTAL = <<<;

            *DIM TIME        WHAT = %TIME%;      WHERE = %TIME%;      USING = TMVL(-12,%TIME%) ;   TOTAL = <<<;

        *ENDALLOCATION

       

        *WHEN MT_ACCOUNT

            *IS PL010

            *REC(EXPRESSION = 0,MT_CATEGORY = Plan, MT_PRODUCT = %PROD%_ND,TIME = %TIME%)

        *ENDWHEN

       

    *NEXT

*NEXT

thanks in advance

thanks

prasad

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

Hi Prasad,

Why do you comment this line????

'TASK(/CPMB/FX_RESTATEMENT_LOGIC;REPLACEPARAM,COMBOBOX%EQU%%COMBOBOX%)

Also there is an error with delimiter in this line (in red)! Have to be comma!

Also 2 extra lines required:

TASK(/CPMB/FX_RESTATMENT_LOGIC,TAB,%TAB%)

TASK(/CPMB/FX_RESTATMENT_LOGIC,EQU,%EQU%)

Vadim

former_member200880
Participant
0 Kudos

Dear Vadim

thanks for prompt reply and you have been first to help.

sorry, it was un-commented, i forgot to remove that while pasting here.

It was un-commented only in Dynamic script.

Please advise what could be wrong we did.

Also, please let me know if we r supposed to use fx-restatement process or chain or any process chain for logicscript can be  used.

thanks

Prasad

former_member200880
Participant
0 Kudos

Dear Vadim

The package again failed with the error even after adding those tasks you mentioned and un-commented other task as well.

Failed to analyze instruction /CPMB/FX_RESTATEMENT_LOGIC,REPLACEPARAM,COMBOBOX%E

model: MT_PLANNING. Package status: RUNNING

Is there any issue in logicscript?

please let me know

thanks

Prasad

former_member186338
Active Contributor
0 Kudos

You can use FX_RESTATMENT_LOGIC or DEFAULT_FORMULAS_LOGIC or ALLOCATION_LOGIC etc... Actually it's the same chain! Compare chains in transaction RSPC!

Second, your advanced script have to be (already explained in my previous post):

PROMPT(SELECTINPUT,,,,"%ENTITY_DIM%,CURRENCY_DIM%,%TIME_DIM%")

PROMPT(COMBOBOX,%COMBOBOX%,"Select Level:",0,LEVEL0,{LEVEL0,LEVEL1,LEVEL2,LEVEL3}]

INFO(%EQU%,=)

INFO(%TAB%,;)

TASK(/CPMB/FX_RESTATMENT_LOGIC,SUSER,%USER%)

TASK(/CPMB/FX_RESTATMENT_LOGIC,SAPPSET,%APPSET%)

TASK(/CPMB/FX_RESTATMENT_LOGIC,SAPP,%APP%)

TASK(/CPMB/FX_RESTATMENT_LOGIC,SELECTION,%SELECTION%)

TASK(/CPMB/FX_RESTATMENT_LOGIC,TAB,%TAB%)

TASK(/CPMB/FX_RESTATMENT_LOGIC,EQU,%EQU%)

TASK(/CPMB/FX_RESTATEMENT_LOGIC,REPLACEPARAM,COMBOBOX%EQU%%COMBOBOX%)

TASK(/CPMB/FX_RESTATEMENT_LOGIC,LOGICFILENAME,MT_ALLOC_LG.LGF)

Hope it's clear!

Vadim

former_member186338
Active Contributor
0 Kudos

Sorry, but can you read my answers!

In the commented line you have eror ";" instead of ","!!

Can you show the full advanced script?

former_member186338
Active Contributor
0 Kudos

Just for info - parameters of FX_RESTATMENT_LOGIC in RSPC:

Vadim

former_member200880
Participant
0 Kudos

Dear Vadim

sorry, I read your answer. After amending those two lines and removed the delimiter also the package failed. Here is the complete dynamic script.

PROMPT(SELECTINPUT,,,,"%ENTITY_DIM%,CURRENCY_DIM%,%TIME_DIM%")

PROMPT(COMBOBOX,%COMBOBOX%,"Select Level:",0,LEVEL0,{LEVEL0,LEVEL1,LEVEL2,LEVEL3}]

INFO(%EQU%,=)

INFO(%TAB%,;)

TASK(/CPMB/FX_RESTATMENT_LOGIC,TAB,%TAB%)

TASK(/CPMB/FX_RESTATMENT_LOGIC,EQU,%EQU%)

TASK(/CPMB/FX_RESTATMENT_LOGIC,SUSER,%USER%)

TASK(/CPMB/FX_RESTATMENT_LOGIC,SAPPSET,%APPSET%)

TASK(/CPMB/FX_RESTATMENT_LOGIC,SAPP,%APP%)

TASK(/CPMB/FX_RESTATMENT_LOGIC,SELECTION,%SELECTION%)

TASK(/CPMB/FX_RESTATEMENT_LOGIC,REPLACEPARAM,COMBOBOX%EQU%%COMBOBOX%)

TASK(/CPMB/FX_RESTATEMENT_LOGIC,LOGICFILENAME,MT_ALLOC_LG.LGF)

is the below line syntax we used is correct?

TASK(/CPMB/FX_RESTATEMENT_LOGIC,REPLACEPARAM,COMBOBOX%EQU%%COMBOBOX%)

Any issues in Logicscript?

thanks

Prasad

former_member186338
Active Contributor
0 Kudos

"After amending those two lines and removed the delimiter also the package failed." - screenshots please! What is the error?

In general everything looks correct, I have hundreds of scripts like this in my system.

May be it's better to use another name for variable - not %COMBOBOX% but like %LVL%

And:

PROMPT(COMBOBOX,%COMBOBOX%,"Select Level:",0,LEVEL0,{LEVEL0,LEVEL1,LEVEL2,LEVEL3}] - ERROR in Red!

Has to be:

PROMPT(COMBOBOX,%LVL%,"Select Level:",0,LEVEL0,{LEVEL0,LEVEL1,LEVEL2,LEVEL3})

TASK(/CPMB/FX_RESTATEMENT_LOGIC,REPLACEPARAM,LVL%EQU%%LVL%)

And $LVL$ instead of $COMBOBOX$ in script logic code.

Vadim

P.S. A lot of small syntax errors...

former_member200880
Participant
0 Kudos

Dear Vadim

thanks for the help.

I have changed the name to LVL  but same error in package log. here is the screenshot.

I  have changed name in script logic as well.

Cant we just call logic script  without replace param? that line alone causing some issue.

Please advise

In Logic script, can we use this nested loop

*FOR %PROD% = %PRODSET%

    *FOR %TIME% = %TIME_SET%      [ Is this line valid i.e TIME_SET assigned to loop variable]

former_member186338
Active Contributor
0 Kudos

"Cant we just call logic script  without replace param?" - No, it's a correct line!

Please show your screenshot of FX_RESTATMENT_LOGIC in RSPC - may be installation is corrupted and REPLACEPARAM parameter is missing?

Forget about scriptlogic script, you have the issue in the DM advanced script before script logic processing. And nested loop is fine!

Vadim

former_member186338
Active Contributor
0 Kudos

UPS, I have found the issue!!!

ANOTHER SYNTAX ERROR!

NOT:

TASK(/CPMB/FX_RESTATEMENT_LOGIC,REPLACEPARAM,

But

TASK(/CPMB/FX_RESTATMENT_LOGIC,REPLACEPARAM,

Do you see the difference?

Vadim

former_member200880
Participant
0 Kudos

Dear Vadim

many thanks i have made the changes , Also i have  changed the script logic to

*XDIM_MEMBERSET MT_RPTCURRENCY = %MT_RPTCURRENCY_SET%

*XDIM_MEMBERSET MT_ENTITY = %MT_ENTITY_SET%

*XDIM_MEMBERSET TIME = %TIME_SET%

from

*XDIM_MEMBERSET MT_RPTCURRENCY = %RPTCURRENCY_SET%

*XDIM_MEMBERSET MT_ENTITY = %ENTITY_SET%

*XDIM_MEMBERSET TIME = %TIME_SET%

The package is sucessful, but the dis-aggregation didnt work.

here is  the script logic

*XDIM_MEMBERSET MT_ACCOUNT = PL010

*XDIM_MEMBERSET MT_RPTCURRENCY = %MT_RPTCURRENCY_SET%

*XDIM_MEMBERSET MT_ENTITY = %MT_ENTITY_SET%

*XDIM_MEMBERSET TIME = %TIME_SET%

*SELECT(%PRODSET%,"ID",MT_PRODUCT,"GROUP='$LVL$'")

*FOR %PROD% = %PRODSET%

    *FOR %TIME% = %TIME_SET%

        *RUNALLOCATION

            *FACTOR = USING/(TOTAL+0.00000001)

            *DIM MT_CATEGORY WHAT = Plan;        WHERE = Plan;        USING = Actual;            TOTAL = <<<;

            *DIM MT_PRODUCT  WHAT = %PROD%_ND; WHERE = BAS(%PROD%); USING = <<<;               TOTAL = <<<;

            *DIM TIME        WHAT = %TIME%;      WHERE = %TIME%;      USING = TMVL(-12,%TIME%) ;   TOTAL = <<<;

        *ENDALLOCATION

       

        *WHEN MT_ACCOUNT

            *IS PL010

            *REC(EXPRESSION = 0,MT_CATEGORY = Plan, MT_PRODUCT = %PROD%_ND,TIME = %TIME%)

        *ENDWHEN

       

    *NEXT

*NEXT

Is there any logic issue  in above script?

sample product masterdata

GRP11 is parent at Level1 [Level is selected by user from combo box]

GRP12, GRP13, Grp14 are base members of GRP11.

The value is stored thru input in GRP11_ND [dummy member which is independent of hierarchy].

This value needs to be splitted to GRP12, GRP13, GRP14 according to their actual data.

Please let me know if this logic is in sync with the logic script

thanks in advance.

thank u somuch for the help so far.

best regards

Prasad

former_member186338
Active Contributor
0 Kudos

OK, the advanced DM script issue is solved!

It's better to close this discussion and open another - just about script itself! You have to provide script execution in UJKT... etc...

*FACTOR = USING/(TOTAL+0.00000001) - what do you mean by this???

Please read

Vadim

former_member200880
Participant
0 Kudos

Dear Vadim

Sure, I will close this chain.

I am so glad for your help.

*FACTOR = USING/(TOTAL+0.00000001).

The above line I have added just for safety, sometimes there may not be drivers, So that total could lead to zero. So anything divided by 0, or 0/0 gives indefinite results.

so just added 0.000001 a minute value to denominator to avoid indefinite values.

0/0.000001 would 0 not impact, but 0/0 gives issues i believe.

thanks

Prasad

former_member186338
Active Contributor
0 Kudos

You don't need to add 0.000001

Vadim

Answers (0)