SAP SWA_OPERATOR_TO_HTML Function Module for
SWA_OPERATOR_TO_HTML is a standard swa operator 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 to perform a specific ABAP function and below is the pattern details, 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 swa operator to html FM, simply by entering the name SWA_OPERATOR_TO_HTML into the relevant SAP transaction such as SE37 or SE38.
Function Group: SWA7
Program Name: SAPLSWA7
Main Program: SAPLSWA7
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function SWA_OPERATOR_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 'SWA_OPERATOR_TO_HTML'".
EXPORTING
INTERNAL_OPERATOR = "
* FORMAT_CLASS = "
* OPERATOR_COLOUR = "
* BACKGROUND_COLOUR = "
* MATH_MODE = ' ' "
* NATURAL_LANGUAGE = ' ' "
IMPORTING
OPERATOR_AS_HTML = "
EXCEPTIONS
UNKNOWN_OPERATOR = 1
IMPORTING Parameters details for SWA_OPERATOR_TO_HTML
INTERNAL_OPERATOR -
Data type: SWB_LOGOPTOptional: No
Call by Reference: Yes
FORMAT_CLASS -
Data type: STRINGOptional: Yes
Call by Reference: No ( called with pass by value option)
OPERATOR_COLOUR -
Data type: STRINGOptional: Yes
Call by Reference: No ( called with pass by value option)
BACKGROUND_COLOUR -
Data type: STRINGOptional: Yes
Call by Reference: No ( called with pass by value option)
MATH_MODE -
Data type: XFELDDefault: SPACE
Optional: Yes
Call by Reference: Yes
NATURAL_LANGUAGE -
Data type: XFELDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for SWA_OPERATOR_TO_HTML
OPERATOR_AS_HTML -
Data type: STRINGOptional: No
Call by Reference: Yes
EXCEPTIONS details
UNKNOWN_OPERATOR -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for SWA_OPERATOR_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_operator_as_html | TYPE STRING, " | |||
| lv_unknown_operator | TYPE STRING, " | |||
| lv_internal_operator | TYPE SWB_LOGOPT, " | |||
| lv_format_class | TYPE STRING, " | |||
| lv_operator_colour | TYPE STRING, " | |||
| lv_background_colour | TYPE STRING, " | |||
| lv_math_mode | TYPE XFELD, " SPACE | |||
| lv_natural_language | TYPE XFELD. " SPACE |
|   CALL FUNCTION 'SWA_OPERATOR_TO_HTML' " |
| EXPORTING | ||
| INTERNAL_OPERATOR | = lv_internal_operator | |
| FORMAT_CLASS | = lv_format_class | |
| OPERATOR_COLOUR | = lv_operator_colour | |
| BACKGROUND_COLOUR | = lv_background_colour | |
| MATH_MODE | = lv_math_mode | |
| NATURAL_LANGUAGE | = lv_natural_language | |
| IMPORTING | ||
| OPERATOR_AS_HTML | = lv_operator_as_html | |
| EXCEPTIONS | ||
| UNKNOWN_OPERATOR = 1 | ||
| . " SWA_OPERATOR_TO_HTML | ||
ABAP code using 7.40 inline data declarations to call FM SWA_OPERATOR_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_math_mode) | = ' '. | |||
| DATA(ld_natural_language) | = ' '. | |||
Search for further information about these or an SAP related objects