SAP CONVERT_RTF_TO_ITF Function Module for Text Conversion RFT to ITF (SAPscript Format)
CONVERT_RTF_TO_ITF is a standard convert rtf to itf SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Text Conversion RFT to ITF (SAPscript Format) 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 convert rtf to itf FM, simply by entering the name CONVERT_RTF_TO_ITF into the relevant SAP transaction such as SE37 or SE38.
Function Group: STXK
Program Name: SAPLSTXK
Main Program: SAPLSTXK
Appliation area: S
Release date: 21-Feb-2001
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CONVERT_RTF_TO_ITF 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 'CONVERT_RTF_TO_ITF'"Text Conversion RFT to ITF (SAPscript Format).
EXPORTING
HEADER = "Text Header of Result Text (Part)
* SSHEET = ' ' "Print format; only effective for print format conversion
* WITH_TAB = ' ' "Print format conversion; 'X' = yes or ' ' = no
* MASK_BRACKETS = 'X' "Mask special characters <..>
X_DATATAB = "Foreign Text Table (Binary)
X_SIZE = "Size of X_DATATAB in Bytes
IMPORTING
WITH_TAB_E = "Format conversion as desired?
TABLES
ITF_LINES = "SAPscript ITF Table
EXCEPTIONS
INVALID_TABLETYPE = 1 MISSING_SIZE = 2
IMPORTING Parameters details for CONVERT_RTF_TO_ITF
HEADER - Text Header of Result Text (Part)
Data type: THEADOptional: No
Call by Reference: Yes
SSHEET - Print format; only effective for print format conversion
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: Yes
WITH_TAB - Print format conversion; 'X' = yes or ' ' = no
Data type: TDBOOLDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
MASK_BRACKETS - Mask special characters <..>
Data type: TDBOOLDefault: 'X'
Optional: Yes
Call by Reference: Yes
X_DATATAB - Foreign Text Table (Binary)
Data type: TDTAB_X256Optional: No
Call by Reference: Yes
X_SIZE - Size of X_DATATAB in Bytes
Data type: IOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CONVERT_RTF_TO_ITF
WITH_TAB_E - Format conversion as desired?
Data type: TDBOOLOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CONVERT_RTF_TO_ITF
ITF_LINES - SAPscript ITF Table
Data type: TLINEOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
INVALID_TABLETYPE - Parameter 'TABLETYPE' contains an invalid value.
Data type:Optional: No
Call by Reference: Yes
MISSING_SIZE - Parameter 'X_SIZE' was not filled.
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for CONVERT_RTF_TO_ITF 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_header | TYPE THEAD, " | |||
| lt_itf_lines | TYPE STANDARD TABLE OF TLINE, " | |||
| lv_with_tab_e | TYPE TDBOOL, " | |||
| lv_invalid_tabletype | TYPE TDBOOL, " | |||
| lv_ssheet | TYPE C, " SPACE | |||
| lv_missing_size | TYPE C, " | |||
| lv_with_tab | TYPE TDBOOL, " SPACE | |||
| lv_mask_brackets | TYPE TDBOOL, " 'X' | |||
| lv_x_datatab | TYPE TDTAB_X256, " | |||
| lv_x_size | TYPE I. " |
|   CALL FUNCTION 'CONVERT_RTF_TO_ITF' "Text Conversion RFT to ITF (SAPscript Format) |
| EXPORTING | ||
| HEADER | = lv_header | |
| SSHEET | = lv_ssheet | |
| WITH_TAB | = lv_with_tab | |
| MASK_BRACKETS | = lv_mask_brackets | |
| X_DATATAB | = lv_x_datatab | |
| X_SIZE | = lv_x_size | |
| IMPORTING | ||
| WITH_TAB_E | = lv_with_tab_e | |
| TABLES | ||
| ITF_LINES | = lt_itf_lines | |
| EXCEPTIONS | ||
| INVALID_TABLETYPE = 1 | ||
| MISSING_SIZE = 2 | ||
| . " CONVERT_RTF_TO_ITF | ||
ABAP code using 7.40 inline data declarations to call FM CONVERT_RTF_TO_ITF
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_ssheet) | = ' '. | |||
| DATA(ld_with_tab) | = ' '. | |||
| DATA(ld_mask_brackets) | = 'X'. | |||
Search for further information about these or an SAP related objects