cancel
Showing results for 
Search instead for 
Did you mean: 

Script Logic Issue

Former Member
0 Kudos

Hi gurus,

When i run the Script logic in UJKT its working fine.. If i run through DMP is getting Aborted,,,,,  Before its works in DMP as well...

Please Help me strange Issue......

*XDIM_MEMBERSET ACCOUNT = STD_QUANTITY

*XDIM_MEMBERSET AUDITTRAIL = ECC

*XDIM_MEMBERSET TIME = 2016.INP

*XDIM_MEMBERSET CATEGORY=Actual

*XDIM_MEMBERSET PLANT=1003

*WHEN ACCOUNT

*IS STD_QUANTITY

*REC(EXPRESSION = (%VALUE%*([ACCOUNT].[SALES_QTY],[TIME].[2016.01],[CATEGORY].[Plan],[AUDITTRAIL].[Input],[ARTICLE].[A_NONE],[ARTICLE_COLOR].[ART_NONE],[PLANT].[1002]))/%VALUE%,ACCOUNT = ARTICLE_QTY,PLANT=PRODUCT.PACKING_PLANT,TIME = 2016.01,AUDITTRAIL=Input,CATEGORY=Plan)

*ENDWHEN

Thank You in Advance

Regards

PJR

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Thank You..

I Removed %value% , its Working Now......

akos_beres
Contributor
0 Kudos

PJR,

Now this will work for 2016.01 ... do you need this script to work for other months as well or will someone manual update the time?

Akos

Former Member
0 Kudos

Thank You Vadim,

Actually My script same as yours, but Because of Abort i hard coded to check where is the issue...

Now Issue was solved there is a problem in the back end every time i run the Package there is dump ...

Basis team Solve the Issue.......

My Product Std Qty is different to each prouduct"--Some of my Products has one Article and  std qty 2 ,, if i dont divide i will get double value..

      Product     Article    Account         

     F002           A002     STD_QTY          2         now i will get   2*1000= 2000      But my sales qty 1000 only...


Thank you

Regards

PJR

former_member186338
Active Contributor
0 Kudos

Sorry, but you don't understand me:

WHEN/ENDWHEN will loop only base members!

For each record %VALUE% is the current intersection of base members.

Then you perform division %VALUE%/%VALUE% = 1 always!!!

%VALUE%/%VALUE% - useless!

former_member186338
Active Contributor
0 Kudos

*REC(EXPRESSION = ([ACCOUNT].[SALES_QTY],[TIME].[2016.01],[CATEGORY].[Plan],[AUDITTRAIL].[Input],[ARTICLE].[A_NONE],[ARTICLE_COLOR].[ART_NONE],[PLANT].[1002]), ACCOUNT = ARTICLE_QTY, PLANT=PRODUCT.PACKING_PLANT, TIME = 2016.01, AUDITTRAIL=Input, CATEGORY=Plan)

Is the same!

Former Member
0 Kudos

DM Script:::

PROMPT(SELECTINPUT,,,,"%TIME_DIM%,%CATEGORY_DIM%")

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

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

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

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

TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,PRODUCT_2_ARTICLE.LGF)

Second: "If I dont Multiple and Divide Std Qty i will get Double Value" - why???

%VALUE% is constant for each record: 2/2=1

My Product Std Qty is different to each prouduct......it can be 1,2 ,3,4,5 6

This how we want the result......

Thank You

Regards

Jeevan

former_member186338
Active Contributor
0 Kudos

Try simple script to test:

*XDIM_MEMBERSET ACCOUNT = STD_QUANTITY

*XDIM_MEMBERSET AUDITTRAIL = ECC

*XDIM_MEMBERSET TIME = %TIME_SET%

*XDIM_MEMBERSET CATEGORY=%CATEGORY_SET%

*XDIM_MEMBERSET PLANT=1003

*WHEN ACCOUNT

*IS *

*REC(EXPRESSION = %VALUE%)

*ENDWHEN

"My Product Std Qty is different to each prouduct" - but for each record in the REC it will be the same!

Vadim

former_member186338
Active Contributor
0 Kudos

P.S. And please show administration screenshot of your TIME dimension - to see how you setup INP members.

Former Member
0 Kudos

Thank u for quick response Vadim and Akos,

Actually I have not given any selection in DMP,, Before Its Work Fine ,, I Put Selection TIme and Category  ... Presently its Hardcode....

Actually Why i have to Multiple and Divide the Same Values,, Because My BOM data Available At Product,Article and all other Dimension..Where my sales qty data Available at Article Level and Product is (P_NONE)....

Product and article Mapping is available through BOM....

Here my Logic is to convert article Wise Sales Qty into Product level.....

Ex:  Product=P_NONE

         Article= A001

        ACCOUNT= SALES_QTY

       Signed Data is 1000

My BOM: In Product=F0001  i have article A001 ,A002

                 Account= STD_QUANTITY

                 Signned data is Now 2 because its has 2 Article in BOM

My Requirement is to Updates article level Data into Product level....

My Logic is Standard Quantity * Sales QTY /Standard Qty

                   2* 1000/2          =1000

If I dont Multiple and Divide Std Qty i will get Double Value

Thank You

Regards

Jeevan

former_member186338
Active Contributor
0 Kudos

First - PLEASE - DM advanced script!

Second: "If I dont Multiple and Divide Std Qty i will get Double Value" - why???

%VALUE% is constant for each record: 2/2=1

akos_beres
Contributor
0 Kudos

PJR,

this also doesn't make sense:

%VALUE%*([ACCOUNT].[SALES_QTY],[TIME].[2016.01],[CATEGORY].[Plan],[AUDITTRAIL].[Input],[ARTICLE].[A_NONE],[ARTICLE_COLOR].[ART_NONE],[PLANT].[1002]))/%VALUE%


this expression is (value*number)/value= number ... no need for multiplication and then division


You also have an extra parenthesis after your tuple member [ACCOUNT].[SALES_QTY],[TIME].[2016.01],[CATEGORY].[Plan],[AUDITTRAIL].[Input],[ARTICLE].[A_NONE],[ARTICLE_COLOR].[ART_NONE],[PLANT].[1002])


Akos

former_member186338
Active Contributor
0 Kudos

No extra parenthesis:


*REC

(

EXPRESSION =

(

%VALUE%*

([ACCOUNT].[SALES_QTY],[TIME].[2016.01],[CATEGORY].[Plan],[AUDITTRAIL].[Input],[ARTICLE].[A_NONE],[ARTICLE_COLOR].[ART_NONE],[PLANT].[1002])

)

/

%VALUE%,ACCOUNT = ARTICLE_QTY,PLANT=PRODUCT.PACKING_PLANT,TIME = 2016.01,AUDITTRAIL=Input,CATEGORY=Plan

)

But the logic is absolutely strange

akos_beres
Contributor
0 Kudos

Vadim,

good catch ... thanks for the correction!

Akos

former_member186338
Active Contributor
0 Kudos

"If i run through DMP is getting Aborted,,,"?

- Error screenshot

- What do you select when running package?

- What is the advanced script of DM package?

akos_beres
Contributor
0 Kudos

Vadim,

most of the answers are in his screenshot:

- Error screenshot

Status shows aborted ... Package log says succesful

- What do you select when running package?

Selection in screenshot ... Category: Plan ... Time: 2016.01

PJR,

It looks like something in your selection is not passing into the script. The logic aborts on the "modify" step.


Which DM package did you assign to this script logic?


As Vadim asked can you post the advanced script?


Akos

former_member186338
Active Contributor
0 Kudos

I suspect that advanced DM script is not referencing the correct LGF file or ...

Also the script has no variables inside!