2007 Oct 01 7:01 AM
hi all,
can anybody tell me function module do below things....
Pick up the month and the respective week from the value of ERSDA.
Message was edited by:
PARESH PATEL
2007 Oct 01 7:03 AM
Hi Paresh,
Could you elaborate on your requirement?
Regards,
hi all,
can anybody tell me function module do below things....
Pick up the month and the respective week from the value of ERSDA.
Message was edited by:
PARESH PATEL
2007 Oct 01 7:03 AM
Hi Paresh,
Could you elaborate on your requirement?
Regards,
2007 Oct 01 7:06 AM
my requrement is,
Pick up the month and the respective week from the value of ERSDA.
2007 Oct 01 7:10 AM
2007 Oct 01 7:10 AM
Hi,
Use the FM:DATE_GET_WEEK .
Import : YYYYMMDD; Export : YYYYNN, where NN is # of week and YYYY is year.
ashish
2007 Oct 01 7:59 AM
Hi Paresh,
Use the below code.
DATA: v_ersda TYPE sy-datum VALUE '20071001'.
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.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |