Zed FrameOpen workbench

ABAP Function Module Reference

Browse the function modules supported by the Zed Frame educational runtime, with parameters, descriptions and ABAP call examples.

CONVERSION_EXIT_ALPHA_INPUT

Pad input text with zeros to a minimum of 10 characters.

Parameters
NameDirectionTypeDescription
INPUT (required)EXPORTINGSTRINGInput text
OUTPUTIMPORTINGSTRINGConverted text
DATA value TYPE string.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
  EXPORTING input = '12345'
  IMPORTING output = value.
WRITE: / value.

Example output:

0000012345

The local adapter uses a minimum width of 10; it does not infer all DDIC-specific ALPHA conversion rules.

CONVERSION_EXIT_ALPHA_OUTPUT

Remove leading zeros before digits.

Parameters
NameDirectionTypeDescription
INPUT (required)EXPORTINGSTRINGInput text
OUTPUTIMPORTINGSTRINGConverted text
DATA value TYPE string.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
  EXPORTING input = '0000012345'
  IMPORTING output = value.
WRITE: / value.

Example output:

12345

Converts leading numeric zeros. Field-specific DDIC rules are not inferred.

DATE_COMPUTE_DAY

Determine the weekday of a valid Gregorian date in internal YYYYMMDD format.

Parameters
NameDirectionTypeDescription
DATE (required)EXPORTINGDCalendar date
DAYIMPORTINGIWeekday: Monday 1 through Sunday 7
DATA weekday TYPE i.
CALL FUNCTION 'DATE_COMPUTE_DAY'
  EXPORTING date = '20261010'
  IMPORTING day = weekday.
WRITE: / weekday.

Example output:

6

Uses UTC calendar arithmetic; no timezone or factory-calendar conversion is performed.

DATE_CHECK_PLAUSIBILITY

Check a YYYYMMDD date, including leap years and month lengths.

Parameters
NameDirectionTypeDescription
DATE (required)EXPORTINGDCalendar date
CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY'
  EXPORTING date = '20260230'
  EXCEPTIONS date_no_plausible = 1
             OTHERS = 2.
WRITE: / sy-subrc.

Example output:

1

An invalid calendar date raises DATE_NO_PLAUSIBLE. Exception mappings set sy-subrc.

Exceptions: DATE_NO_PLAUSIBLE

CONVERT_DATE_TO_INTERNAL

Convert a supported external date to internal YYYYMMDD form.

Parameters
NameDirectionTypeDescription
DATE_EXTERNAL (required)EXPORTINGSTRINGDD.MM.YYYY, DD/MM/YYYY, or YYYY-MM-DD
DATE_INTERNALIMPORTINGDValidated internal date
DATA internal_date TYPE d.
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
  EXPORTING date_external = '14.10.2026'
  IMPORTING date_internal = internal_date.
WRITE: / internal_date.

Example output:

20261014

Uses an explicit locale-independent format subset; SAP user date-format settings are not available in this simulator.

Exceptions: DATE_FORMAT_INVALID, DATE_NO_PLAUSIBLE

CONVERT_DATE_TO_EXTERNAL

Format an internal date as DD.MM.YYYY.

Parameters
NameDirectionTypeDescription
DATE_INTERNAL (required)EXPORTINGDValidated internal YYYYMMDD date
DATE_EXTERNALIMPORTINGSTRINGExternal dotted date
DATA external_date TYPE string.
CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'
  EXPORTING date_internal = '20261014'
  IMPORTING date_external = external_date.
WRITE: / external_date.

Example output:

14.10.2026

Uses DD.MM.YYYY because the simulator does not have SAP user locale settings.

Exceptions: DATE_NO_PLAUSIBLE

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

WEEK_GET_FIRST_DAY

Find the Monday starting an ISO week in YYYYWW form.

Parameters
NameDirectionTypeDescription
WEEK (required)EXPORTINGNUMC 6ISO year and week, YYYYWW
DATEIMPORTINGDMonday of the requested week
DATA monday TYPE d.
CALL FUNCTION 'WEEK_GET_FIRST_DAY'
  EXPORTING week = '202642'
  IMPORTING date = monday.
WRITE: / monday.

Example output:

20261012

Accepts ISO week keys only; non-ISO factory calendars are not simulated.

Exceptions: WEEK_INVALID

RP_CALC_DATE_IN_INTERVAL

Add or subtract a bounded days/months/years interval from a date.

Parameters
NameDirectionTypeDescription
DATE (required)EXPORTINGDStart date in YYYYMMDD format
DAYSEXPORTINGINumber of days
MONTHSEXPORTINGINumber of months
YEARSEXPORTINGINumber of years
SIGNUMEXPORTINGCPlus or minus sign
CALC_DATEIMPORTINGDCalculated date
DATA due_date TYPE d.
CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
  EXPORTING date = '20260131'
            days = 0
            months = 1
            years = 0
            signum = '+'
  IMPORTING calc_date = due_date.
WRITE: / due_date.

Example output:

20260228

Month/year shifts clamp to the last day of the resulting month. Each interval is bounded; SAP payroll calendar rules are not implemented.

Exceptions: DATE_NO_PLAUSIBLE, INTERVAL_OUT_OF_RANGE

ZED_STRING_REPLACE

Replace all occurrences of a literal substring in bounded text.

Parameters
NameDirectionTypeDescription
INPUT (required)EXPORTINGSTRINGSource text (maximum 32,768 characters)
SUBSTRING (required)EXPORTINGSTRINGLiteral substring to find
REPLACEMENTEXPORTINGSTRINGReplacement text
OUTPUTIMPORTINGSTRINGUpdated text
DATA result TYPE string.
CALL FUNCTION 'ZED_STRING_REPLACE'
  EXPORTING input = 'ABAP Playground'
            substring = 'Playground'
            replacement = 'Workbench'
  IMPORTING output = result.
WRITE: / result.

Example output:

ABAP Workbench

ZED_ denotes a local training helper, not an SAP-delivered function module. Matching is literal and case-sensitive.

Exceptions: TEXT_TOO_LONG, SUBSTRING_EMPTY

ZED_STRING_NORMALIZE

Trim text and collapse repeated whitespace to one space.

Parameters
NameDirectionTypeDescription
INPUT (required)EXPORTINGSTRINGSource text (maximum 32,768 characters)
OUTPUTIMPORTINGSTRINGNormalized text
DATA result TYPE string.
CALL FUNCTION 'ZED_STRING_NORMALIZE'
  EXPORTING input = '  ABAP   Playground  '
  IMPORTING output = result.
WRITE: / result.

Example output:

ABAP Playground

ZED_ denotes a local training helper. Whitespace is normalized without locale-specific text rules.

Exceptions: TEXT_TOO_LONG

REUSE_ALV_GRID_DISPLAY

Display a typed internal table using the common local ALV renderer.

Parameters
NameDirectionTypeDescription
T_OUTTAB (required)TABLESANY TABLEOutput records
IT_FIELDCATEXPORTINGANY TABLEOptional classic field catalog
IT_FIELDCAT_LVCEXPORTINGANY TABLEOptional LVC field catalog
IS_LAYOUTEXPORTINGANYLayout settings: ZEBRA
IS_LAYOUT_LVCEXPORTINGANYLVC layout settings: ZEBRA
I_GRID_TITLEEXPORTINGSTRINGGrid heading
I_STRUCTURE_NAMEEXPORTINGSTRINGLocal structure type name
TYPES: BEGIN OF ty_row, id TYPE i, label TYPE string, END OF ty_row.
DATA rows TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY.
rows = VALUE #( ( id = 1 label = 'Local ALV' ) ).
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
  EXPORTING i_grid_title = 'Classic ALV example'
  TABLES t_outtab = rows.

Example output:

Classic ALV example
ID | LABEL
1 | Local ALV

Supports table data, column labels/visibility/totals and zebra layout. Callback programs, editable GUI grids and frontend services are not implemented.

REUSE_ALV_GRID_DISPLAY_LVC

Display a typed internal table using the common local ALV renderer.

Parameters
NameDirectionTypeDescription
T_OUTTAB (required)TABLESANY TABLEOutput records
IT_FIELDCATEXPORTINGANY TABLEOptional classic field catalog
IT_FIELDCAT_LVCEXPORTINGANY TABLEOptional LVC field catalog
IS_LAYOUTEXPORTINGANYLayout settings: ZEBRA
IS_LAYOUT_LVCEXPORTINGANYLVC layout settings: ZEBRA
I_GRID_TITLEEXPORTINGSTRINGGrid heading
I_STRUCTURE_NAMEEXPORTINGSTRINGLocal structure type name
TYPES: BEGIN OF ty_row, id TYPE i, label TYPE string, END OF ty_row.
DATA rows TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY.
rows = VALUE #( ( id = 1 label = 'Local ALV' ) ).
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
  EXPORTING i_grid_title = 'Classic ALV example'
  TABLES t_outtab = rows.

Example output:

Classic ALV example
ID | LABEL
1 | Local ALV

Supports table data, column labels/visibility/totals and zebra layout. Callback programs, editable GUI grids and frontend services are not implemented.