Working with weeks

 

Data:
   l_scal_week LIKE scal-week,
   l_date_low like sy-datum,
   l_date_high like sy-datum.

*--- Find start date for current week

* Find current week
CALL FUNCTION 'DATE_GET_WEEK'
    EXPORTING
      date         = sy-datum
    IMPORTING
      week         = l_scal_week
    EXCEPTIONS
      date_invalid = 1
      OTHERS       = 2.
  IF sy-subrc <> 0.
    EXIT.
  ENDIF.

* Start date current week
  CALL FUNCTION 'WEEK_GET_FIRST_DAY'
    EXPORTING
      week         = l_scal_week
    IMPORTING
      date         = l_date_low
    EXCEPTIONS
      week_invalid = 1
      OTHERS       = 2.
  IF sy-subrc <> 0.
    EXIT.
  ENDIF.

Converted from CHM to HTML with chm2web Standard 2.7 (unicode)