CA
Function module
Used the same way in S/4HANA
FORMAT_MESSAGE Format Message Text
Builds the complete text of a message from message class, number and up to four variables in the requested language. It is widely used to turn BAPIRET2 lines, SY-MSG fields or batch input messages into readable text for logs and ALV outputs. Pass the language explicitly (for example SY-LANGU); for BAPI messages MESSAGE_TEXT_BUILD or the MESSAGE field of BAPIRET2 are alternatives.
- Function group
- SPOO
- Remote-enabled (RFC)
- No
- Type
- Function module
Importing parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| ID | — | Message class | — |
| LANG | — | Language | — |
| NO | — | Message number | — |
| V1 | — | Message variable 1 | — |
| V2 | — | Message variable 2 | — |
| V3 | — | Message variable 3 | — |
| V4 | — | Message variable 4 | — |
Exporting parameters
| Parameter | Type | Description |
|---|---|---|
| MSG | — | Formatted message text |
Exceptions
- NOT_FOUND — Message not found
Call template (ABAP)
A skeleton generated from the interface. It lists mandatory importing parameters, exporting parameters and tables; declare the variables with suitable types in your own program.
CALL FUNCTION 'FORMAT_MESSAGE'
IMPORTING
msg = lv_msg
EXCEPTIONS
not_found = 1
OTHERS = 2.Related tables
Can't find the report you need?
We also build anything that is not in the catalog. Describe it briefly and we will suggest the right solution.