on 03-03-2010 4:48 PM
Hi Experts,
I'm trying to create a macro that would pull values from one row and transfer them (backwards) in another based on the Lead Time of a product.
I know how to get the lead time in days from the Product with the MATLOC function :
LAYOUTVARIABLE_SET('LT' ;
MATLOC('CHKHOR' ; ACT_PRODUCT ; ACT_LOCATION ; ACT_VERSION
)
)
I'm thinking of using the TIMESHIFT_BACKWARDS function, but I don't know exactly how to use it.
I'm guessing I would have to convert my lead-time from Workdays to Weeks (my planning book is in weeks) ?
Also that would mean the macro wouldn't be really flexible and only usable in a Week Bucket format.
Is there a way to make a shift only based on date and not Time Buckets ?
Thanks,
Marc
The thing that was messing it up for me was the Area vs Row items.
You have to have two Rows I think :
1. Row with the values you would like to shift.
2. Row with the shift values.
Then in the TIMESHIFT function you have to use these rows inside Areas.
Here what it looks like for me now and it works.
Fill Auxiliary Table : ( 105 Iterations :Initial; W 10.2011 )
Row: Time_Buckets ( Frm Initial ) =
LAYOUTVAR_VALUE( 'TB' )
Time_Shift : ( 1 Iterations :Initial;Initial )
Area: Agrolante Production ( Initial ) =
TIMESHIFT_BACKWARDS(
Area: [ $Agrolante Receptions ( Initial ) ; $Agrolante Receptions ( W 10.2011 ) ]
Area: [ Time_Buckets ( Initial ) ; Time_Buckets ( W 10.2011 ) ]
)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, I'm making progress, but my TimeShift function doesn't want to work. For some reason it just delete my values.
Here is what I have right now, am I doing something worng ?
Macros in the Macro Book
Get_Lead_Time
Copy Receptions : ( 105 Iterations :Initial; W 09.2011 )
Row: Agrolante Production ( Frm Initial ) =
Row: Agrolante Receptions ( Frm Initial )
Get Lead_Time : ( 1 Iterations :Initial;Initial )
IF
DET_LEVEL = 1
DET_LEVEL('AGRO_FR')= 1
Get Lead_Time
LAYOUTVARIABLE_SET( 'LT' ;
MATLOC( 'CHKHOR' ;
ACT_PRODUCT ;
ACT_LOCATION ;
ACT_VERSION
)
)
ENDIF
Get Nb of Days in Time Buckets : ( 1 Iterations : W 11.2009; W 11.2009 )
IF
DET_LEVEL = 1
DET_LEVEL('AGRO_FR')= 1
Get Nb of Days
LAYOUTVARIABLE_SET( 'NB' ;
BUCKET_DAYS(ACT_COLUMN)
)
ENDIF
Calculate Nb of Time Buckets : ( 1 Iterations :Initial;Initial )
IF
DET_LEVEL = 1
DET_LEVEL('AGRO_FR')= 1
Calculate Nb of Time Buckets
LAYOUTVARIABLE_SET( 'TB' ;
LAYOUTVAR_VALUE( 'LT' )
/
LAYOUTVAR_VALUE( 'NB' ) ;
0
)
ENDIF
Fill Auxiliary Table : ( 105 Iterations :Initial; W 09.2011 )
Row: Time_Buckets ( Frm Initial ) =
LAYOUTVAR_VALUE( 'TB' )
Time_Shift : ( 52 Iterations : W 10.2010; W 09.2011 )
Row: Agrolante Production ( Frm W 10.2010 ) =
TIMESHIFT_BACKWARDS(
Row: Agrolante Production ( Frm W 10.2010 )
Row: Time_Buckets ( Frm W 10.2010 )
)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Even i am looking for same solution.
In our case we have Long Transitit times to the Customer, based on that demand need to shift backword wrt Product & Customer Combination in DP.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.