Zed FrameOpen workbench

DATE_GET_WEEK — ABAP Function Module

Return the ISO year and week number as YYYYWW for a valid date.

DATE_GET_WEEK

Return the ISO year and week number as YYYYWW for a valid date.

Parameters
NameDirectionTypeDescription
DATE (required)EXPORTINGDInternal YYYYMMDD date
WEEKIMPORTINGNUMC 6ISO week key YYYYWW
DATA week TYPE n LENGTH 6.
CALL FUNCTION 'DATE_GET_WEEK'
  EXPORTING date = '20261014'
  IMPORTING week = week.
WRITE: / week.

Example output:

202642

Returns an ISO-8601 week. Locale-specific SAP factory or calendar rules are not applied.

Exceptions: DATE_NO_PLAUSIBLE