2009 Dec 02 3:15 AM
hi all,
we have a request to get the date 4 weeks from today.
eg. today is 12/02/2009, the return date (4 weeks from today) is 12/23/2009.
i know we can obtain the week number through FM "date_get_week".
is there any other FM can return date (4 weeks from today)?
not BKK_ADD_MONTH_TO_DATE -- because we're not looking exactly for one month.
not RP_CALC_DATE_IN_INTERVAL-- unless user can give me exactly how many days interval.
thanks.
Edited by: Reetha Pitchee Maridas on Dec 2, 2009 4:16 AM
2009 Dec 02 4:05 AM
Hi,
Create a custom function module with date as the input parameter and output parameter.
First use FM: DAY_IN_WEEK to get the current day number of the week (Say, D1).
Then use DATE_GET_WEEK to get the current dates week number (YYYYWW).
Add 3 (to get the 4th week) to the last two digits of the result (W3).
Then, use FM VELO03_WEEK_OR_MONTH_TO_DATE to get the starting date (Pass the W3 and year as parameters).
Add, the D1 day number to the result that you got from VELO03_WEEK_OR_MONTH_TO_DATE and return the date.
Regards,
Subramanian
hi all,
we have a request to get the date 4 weeks from today.
eg. today is 12/02/2009, the return date (4 weeks from today) is 12/23/2009.
i know we can obtain the week number through FM "date_get_week".
is there any other FM can return date (4 weeks from today)?
not BKK_ADD_MONTH_TO_DATE -- because we're not looking exactly for one month.
not RP_CALC_DATE_IN_INTERVAL-- unless user can give me exactly how many days interval.
thanks.
Edited by: Reetha Pitchee Maridas on Dec 2, 2009 4:16 AM
2009 Dec 02 4:05 AM
Hi,
Create a custom function module with date as the input parameter and output parameter.
First use FM: DAY_IN_WEEK to get the current day number of the week (Say, D1).
Then use DATE_GET_WEEK to get the current dates week number (YYYYWW).
Add 3 (to get the 4th week) to the last two digits of the result (W3).
Then, use FM VELO03_WEEK_OR_MONTH_TO_DATE to get the starting date (Pass the W3 and year as parameters).
Add, the D1 day number to the result that you got from VELO03_WEEK_OR_MONTH_TO_DATE and return the date.
Regards,
Subramanian
2009 Dec 02 4:42 AM
Hi,
You try this
CALL FUNCTION 'BKK_ADD_WORKINGDAY'
EXPORTING
i_date = < today's date >
i_days = <here you give 21>
I_CALENDAR1 =*
I_CALENDAR2 =*
IMPORTING
E_DATE = <here you will get the date>
E_RETURN = .
Regards,
Smart Varghese
2009 Dec 02 5:10 AM
hi all,
thanks for the suggestion.
i realized that if we give 21 days to both RP_CALC_DATE_IN_INTERVAL and
BKK_ADD_WORKINGDAY it will always return the desired output date.
thank you.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |