Skip to Content
avatar image
Former Member

allocation question

Hi experts ,

I'm facing a problem.

I Have 3 models

Calendar :DAY (Time dimension),Workcenter,Version

Production: TIME,Workcenter,Version,TV_Production, Production_order

Daily_production:DAY,Workcenter,Version,TV_Production, Production_order

what i want to do :

I have the calendar wich is inputed everday by workcenter, and I have a monthly quantity of production wich is by workcenter and production order .

I sent both value to the third model .

and I want to do a split to have a daily production quantity based on the calendar.

the Day dimention :

the Time dimension:

so for the calendar i'm sending values to daily production with prodction_order=NON_APPLICABLE

and for quantity i'm sending values to daily production to for example 2016.01.IMP so I can do an allocation .

my scripts:

copy of calendar to daily production


*DESTINATION_APP =

Daily_production

*ADD_DIM TV_PRODUCTION=CAL
*ADD_DIM ORDRE_FAB=NA
*WHEN DAY
*IS *
*REC(FACTOR=1 )
*ENDWHEN
*COMMIT

Copy of quantity to daily production

*XDIM_MEMBERSET TV_PROD =QUANTITY
*DESTINATION_APP = Daily_production
*RENAME_DIM TIME = DAY

*WHEN TV_PROD
*IS QUANTITY

*REC(FACTOR=1,TIME=TIME.IMPJ)
*ENDWHEN
*COMMIT

-the property IMPJ is where I MAPP months to my Imputation members of DAY dimension .

Example

ID =2016.01 IMPJ: 2016.01.IMP so values are sent to 2016.01.IMP in the DAY dimension.

the allocation I did is :

*SUB SPLITDAY("M")

*RUNALLOCATION
*FACTOR = USING/TOTAL
*DIM DAY WHAT="M".IMP; WHERE=BAS("M")) ; USING=BAS("M") ; TOTAL=<<<;
*DIM TV_PROD WHAT=QUANTITY ; WHERE=QUANTITY_D; USING=CAL;
*DIM PRODUCTION_ORDER WHAT=NA ; WHERE=[ALL]; USING=<<<;

*ENDALLOCATION
*COMMIT
*ENDSUB
SPLITDAY(2016.01)
SPLITDAY(2016.02)
SPLITDAY(2016.03)

but it's not woring because we have CAL values are in Production order =NON Applicable

and quantity is by other members .

do you have any idea how can we resolve that ?

regards and thanks in advance.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Feb 10, 2017 at 03:54 PM

    Comparing the report and the script I can see that:

    *DIM ORDRE_FAB WHAT=NA ; WHERE<>NA; USING=<<<; - Incorrect

    Has to be like:

    *DIM ORDRE_FAB WHAT<>NA ; WHERE<>NA; USING=NA; TOTAL<>NA

    Your source value for allocation is located in <>NA

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 09, 2017 at 11:44 AM

    Sorry, but it's a bad idea to provide some code with SUB's etc...

    Please provide clear test code and explanation of the logic!

    P.S. Why you are still using useless COMMIT in your code????

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      here is athe report with all members , it impossible to list all values of members of my dimension because I have a lot

      values with ID's from the script log.

      here is a screen shot of all values of my dimension:

      and here is the calendar PROD_J

      i'm trying to do my best to give a clear description . this need is complicated .

      report.png (24.7 kB)
      quantity-prod1.png (44.1 kB)