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.
| Name | Direction | Type | Description |
|---|---|---|---|
| INPUT (required) | EXPORTING | STRING | Input text |
| OUTPUT | IMPORTING | STRING | Converted text |
DATA value TYPE string.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING input = '12345'
IMPORTING output = value.
WRITE: / value.Example output:
0000012345The 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.
| Name | Direction | Type | Description |
|---|---|---|---|
| INPUT (required) | EXPORTING | STRING | Input text |
| OUTPUT | IMPORTING | STRING | Converted text |
DATA value TYPE string.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING input = '0000012345'
IMPORTING output = value.
WRITE: / value.Example output:
12345Converts 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.
| Name | Direction | Type | Description |
|---|---|---|---|
| DATE (required) | EXPORTING | D | Calendar date |
| DAY | IMPORTING | I | Weekday: Monday 1 through Sunday 7 |
DATA weekday TYPE i.
CALL FUNCTION 'DATE_COMPUTE_DAY'
EXPORTING date = '20261010'
IMPORTING day = weekday.
WRITE: / weekday.Example output:
6Uses UTC calendar arithmetic; no timezone or factory-calendar conversion is performed.
DATE_CHECK_PLAUSIBILITY
Check a YYYYMMDD date, including leap years and month lengths.
| Name | Direction | Type | Description |
|---|---|---|---|
| DATE (required) | EXPORTING | D | Calendar date |
CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY'
EXPORTING date = '20260230'
EXCEPTIONS date_no_plausible = 1
OTHERS = 2.
WRITE: / sy-subrc.Example output:
1An 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.
| Name | Direction | Type | Description |
|---|---|---|---|
| DATE_EXTERNAL (required) | EXPORTING | STRING | DD.MM.YYYY, DD/MM/YYYY, or YYYY-MM-DD |
| DATE_INTERNAL | IMPORTING | D | Validated 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:
20261014Uses 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.
| Name | Direction | Type | Description |
|---|---|---|---|
| DATE_INTERNAL (required) | EXPORTING | D | Validated internal YYYYMMDD date |
| DATE_EXTERNAL | IMPORTING | STRING | External 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.2026Uses 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.
| Name | Direction | Type | Description |
|---|---|---|---|
| DATE (required) | EXPORTING | D | Internal YYYYMMDD date |
| WEEK | IMPORTING | NUMC 6 | ISO week key YYYYWW |
DATA week TYPE n LENGTH 6.
CALL FUNCTION 'DATE_GET_WEEK'
EXPORTING date = '20261014'
IMPORTING week = week.
WRITE: / week.Example output:
202642Returns 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.
| Name | Direction | Type | Description |
|---|---|---|---|
| WEEK (required) | EXPORTING | NUMC 6 | ISO year and week, YYYYWW |
| DATE | IMPORTING | D | Monday of the requested week |
DATA monday TYPE d.
CALL FUNCTION 'WEEK_GET_FIRST_DAY'
EXPORTING week = '202642'
IMPORTING date = monday.
WRITE: / monday.Example output:
20261012Accepts 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.
| Name | Direction | Type | Description |
|---|---|---|---|
| DATE (required) | EXPORTING | D | Start date in YYYYMMDD format |
| DAYS | EXPORTING | I | Number of days |
| MONTHS | EXPORTING | I | Number of months |
| YEARS | EXPORTING | I | Number of years |
| SIGNUM | EXPORTING | C | Plus or minus sign |
| CALC_DATE | IMPORTING | D | Calculated 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:
20260228Month/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.
| Name | Direction | Type | Description |
|---|---|---|---|
| INPUT (required) | EXPORTING | STRING | Source text (maximum 32,768 characters) |
| SUBSTRING (required) | EXPORTING | STRING | Literal substring to find |
| REPLACEMENT | EXPORTING | STRING | Replacement text |
| OUTPUT | IMPORTING | STRING | Updated 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 WorkbenchZED_ 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.
| Name | Direction | Type | Description |
|---|---|---|---|
| INPUT (required) | EXPORTING | STRING | Source text (maximum 32,768 characters) |
| OUTPUT | IMPORTING | STRING | Normalized text |
DATA result TYPE string.
CALL FUNCTION 'ZED_STRING_NORMALIZE'
EXPORTING input = ' ABAP Playground '
IMPORTING output = result.
WRITE: / result.Example output:
ABAP PlaygroundZED_ 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.
| Name | Direction | Type | Description |
|---|---|---|---|
| T_OUTTAB (required) | TABLES | ANY TABLE | Output records |
| IT_FIELDCAT | EXPORTING | ANY TABLE | Optional classic field catalog |
| IT_FIELDCAT_LVC | EXPORTING | ANY TABLE | Optional LVC field catalog |
| IS_LAYOUT | EXPORTING | ANY | Layout settings: ZEBRA |
| IS_LAYOUT_LVC | EXPORTING | ANY | LVC layout settings: ZEBRA |
| I_GRID_TITLE | EXPORTING | STRING | Grid heading |
| I_STRUCTURE_NAME | EXPORTING | STRING | Local 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 ALVSupports 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.
| Name | Direction | Type | Description |
|---|---|---|---|
| T_OUTTAB (required) | TABLES | ANY TABLE | Output records |
| IT_FIELDCAT | EXPORTING | ANY TABLE | Optional classic field catalog |
| IT_FIELDCAT_LVC | EXPORTING | ANY TABLE | Optional LVC field catalog |
| IS_LAYOUT | EXPORTING | ANY | Layout settings: ZEBRA |
| IS_LAYOUT_LVC | EXPORTING | ANY | LVC layout settings: ZEBRA |
| I_GRID_TITLE | EXPORTING | STRING | Grid heading |
| I_STRUCTURE_NAME | EXPORTING | STRING | Local 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 ALVSupports table data, column labels/visibility/totals and zebra layout. Callback programs, editable GUI grids and frontend services are not implemented.