2009 Jun 18 9:21 AM
Hi friends,
I want how to get physical week for given date.
Ie for 01-04-2009 week no is 1.
Is there any function module?
Pls suggest
Regards
Moosa
2009 Jun 18 9:24 AM
2009 Jun 18 9:24 AM
2009 Jun 18 9:25 AM
2009 Jun 18 9:26 AM
Hi,
You can use function module GET_WEEK_INFO_BASED_ON_DATE.
in this the parameter WEEK gives 6 character output out of which first four gives the year and last two characters gives the week number.
Hope this works for you.
Regards,
Mansi.
2009 Jun 18 9:29 AM
Hi,
Use the below code.
DATA: v_ersda TYPE sy-datum VALUE '20090618'.
DATA: v_month(2) TYPE c,
v_week(2) TYPE c,
v_full_week LIKE scal-week.
MOVE v_ersda+4(2) TO v_month.
CALL FUNCTION 'DATE_GET_WEEK'
EXPORTING
date = v_ersda
IMPORTING
week = v_full_week
EXCEPTIONS
date_invalid = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
MOVE v_full_week+4(2) TO v_week.
WRITE:/5 'Month = ', v_month.
WRITE:/5 'Week = ', v_week.
Regards,
Kumar Bandanadham
2009 Jun 18 9:38 AM
2009 Jun 18 9:48 AM
Hello Friends,
My question is:
Which of these FMs satisfy the requirement as per the OP?
Plz revert back.
BR,
Suhas
2009 Jun 18 9:51 AM
Hi,
What do you mean by OP??
You can get the week by using diff FM .
Rgds,
Sandeep
2009 Jun 18 10:10 AM
Hi,
What do you mean by OP??
I want week no with respect to Fisical year (Apr2009-Mar2010) for input date?
regards
Moosa
2009 Jun 18 10:15 AM
>
> What do you mean by OP??
OP means Original Poster in
Its worth knowing all other terms that are mentioned in the above thread..
Regards
Karthik D