on 08-07-2008 8:57 AM
Hi all,
I am currently developing a macro in DP...and I need to do an action for the first period of a year.
I need to identify the first period for this purpose..I m using the date function Bucket_fiscal_period for this purpose but for soem reasons it is not giving a value of 01 for the first period.
The planning bucket has a weekly bucket pattern.
I tried to use the layoututvariable_set + layoutvariable and then bucket_fiscal_period to try and see if the values are getting set.But this seems not to be happening.
Can anybody tell me whats wrong here?
Thanks and Regards,
Anu
Hello,
If I am understanding your issue correctly you are trying to identify the weekly bucket in which the first day fo the year falls. To accomplish the same I guess the following should work:
OPTION 1:
IF
WEEK ( DATE ( BUCKET_BDATE ( X ) ) = 1
THEN
LAYOUTVARIABLE_SET ( 'FIRSTDAY' )
ENDIF
OPTION 2:
IF
YEAR_BDATE ( WEEK_BDATE () ) >= WEEK_BDATE ()
AND
YEAR_EDATE ( WEEK_BDATE () ) <= WEEK_BDATE ()
THEN
LAYOUTVARIABLE_SET ( 'FIRSTDAY' )
ENDIF
Hope this helps.
Regards,
Abhi
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 | |
4 | |
3 | |
2 | |
2 | |
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.