Translate

Thursday, 7 June 2012

Get date by using Week using FM WEEK_GET_FIRST_DAY in SAP ABAP

DATA: week(2) TYPE c,
            year(4) TYPE c,
            week_in TYPE SCAL-WEEK,
            date_out TYPE SCAL-DATE.

week = '42'.
year = sy-datum(4).

CONCATENATE year week INTO week_in.

CALL FUNCTION week_get_first_day
  EXPORTING
    WEEK         =   week_in
  IMPORTING
    DATE          =   date_out.

WRITE: date_out.

No comments: