SAP OXT_MESSAGE_TO_HTML Function Module for Output Message Long Text
OXT_MESSAGE_TO_HTML is a standard oxt message to html SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Output Message Long Text processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for oxt message to html FM, simply by entering the name OXT_MESSAGE_TO_HTML into the relevant SAP transaction such as SE37 or SE38.
Function Group: OXT_SERVICES_2
Program Name: SAPLOXT_SERVICES_2
Main Program: SAPLOXT_SERVICES_2
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function OXT_MESSAGE_TO_HTML pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'OXT_MESSAGE_TO_HTML'"Output Message Long Text.
EXPORTING
MSGID = "Application Area
MSGNR = "Message Number
* IV_MSGV1 = "Messages, Message Variable
* IV_MSGV2 = "Messages, Message Variable
* IV_MSGV3 = "Messages, Message Variable
* IV_MSGV4 = "Messages, Message Variable
* IV_TITLE = ' ' "
* IV_BGCOLOR = ' ' "
TABLES
ET_HTML = "SAPscript: Text Lines in HTML Format
ET_RETURN = "Return Parameters
EXCEPTIONS
TECHNICAL_ERROR = 1
IMPORTING Parameters details for OXT_MESSAGE_TO_HTML
MSGID - Application Area
Data type: SYMSGIDOptional: No
Call by Reference: Yes
MSGNR - Message Number
Data type: SYMSGNOOptional: No
Call by Reference: Yes
IV_MSGV1 - Messages, Message Variable
Data type: SYMSGVOptional: Yes
Call by Reference: Yes
IV_MSGV2 - Messages, Message Variable
Data type: SYMSGVOptional: Yes
Call by Reference: Yes
IV_MSGV3 - Messages, Message Variable
Data type: SYMSGVOptional: Yes
Call by Reference: Yes
IV_MSGV4 - Messages, Message Variable
Data type: SYMSGVOptional: Yes
Call by Reference: Yes
IV_TITLE -
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: Yes
IV_BGCOLOR -
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: Yes
TABLES Parameters details for OXT_MESSAGE_TO_HTML
ET_HTML - SAPscript: Text Lines in HTML Format
Data type: HTMLLINEOptional: No
Call by Reference: Yes
ET_RETURN - Return Parameters
Data type: BAPIRET2Optional: No
Call by Reference: Yes
EXCEPTIONS details
TECHNICAL_ERROR - Technical Error
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for OXT_MESSAGE_TO_HTML Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_msgid | TYPE SYMSGID, " | |||
| lt_et_html | TYPE STANDARD TABLE OF HTMLLINE, " | |||
| lv_technical_error | TYPE HTMLLINE, " | |||
| lv_msgnr | TYPE SYMSGNO, " | |||
| lt_et_return | TYPE STANDARD TABLE OF BAPIRET2, " | |||
| lv_iv_msgv1 | TYPE SYMSGV, " | |||
| lv_iv_msgv2 | TYPE SYMSGV, " | |||
| lv_iv_msgv3 | TYPE SYMSGV, " | |||
| lv_iv_msgv4 | TYPE SYMSGV, " | |||
| lv_iv_title | TYPE C, " SPACE | |||
| lv_iv_bgcolor | TYPE C. " SPACE |
|   CALL FUNCTION 'OXT_MESSAGE_TO_HTML' "Output Message Long Text |
| EXPORTING | ||
| MSGID | = lv_msgid | |
| MSGNR | = lv_msgnr | |
| IV_MSGV1 | = lv_iv_msgv1 | |
| IV_MSGV2 | = lv_iv_msgv2 | |
| IV_MSGV3 | = lv_iv_msgv3 | |
| IV_MSGV4 | = lv_iv_msgv4 | |
| IV_TITLE | = lv_iv_title | |
| IV_BGCOLOR | = lv_iv_bgcolor | |
| TABLES | ||
| ET_HTML | = lt_et_html | |
| ET_RETURN | = lt_et_return | |
| EXCEPTIONS | ||
| TECHNICAL_ERROR = 1 | ||
| . " OXT_MESSAGE_TO_HTML | ||
ABAP code using 7.40 inline data declarations to call FM OXT_MESSAGE_TO_HTML
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.| DATA(ld_iv_title) | = ' '. | |||
| DATA(ld_iv_bgcolor) | = ' '. | |||
Search for further information about these or an SAP related objects