SAP Function Modules

LIST_CONVERT_TO_RTF SAP Function module







LIST_CONVERT_TO_RTF is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name LIST_CONVERT_TO_RTF into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: SLST
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM LIST_CONVERT_TO_RTF - LIST CONVERT TO RTF





CALL FUNCTION 'LIST_CONVERT_TO_RTF' "
* EXPORTING
*   fontsize_in_halfpoints = 20  "
*   default_filename = SPACE    " rlgrap-filename
*   no_colors = SPACE           " c
*   no_dialog = SPACE           " c
  IMPORTING
    actual_filename =           " rlgrap-filename
  TABLES
    list =                      " slist_list_tab  Internal list format: Contents
    fmbs =                      " slist_fmbs_tab  Internal list format: Formats
    fmbx =                      " slist_fmbs_tab
    fsel =                      " slist_fsel_tab  Internal list format: Fields
*   fpos =                      " slist_fpos_tab
  EXCEPTIONS
    DOWNLOAD_FILE_WRITE_ERROR = 1  "
    DOWNLOAD_NO_BATCH = 2       "
    DOWNLOAD_UNKNOWN_ERROR = 3  "
    .  "  LIST_CONVERT_TO_RTF

ABAP code example for Function Module LIST_CONVERT_TO_RTF





The ABAP code below is a full code listing to execute function module LIST_CONVERT_TO_RTF including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_actual_filename  TYPE RLGRAP-FILENAME ,
it_list  TYPE STANDARD TABLE OF SLIST_LIST_TAB,"TABLES PARAM
wa_list  LIKE LINE OF it_list ,
it_fmbs  TYPE STANDARD TABLE OF SLIST_FMBS_TAB,"TABLES PARAM
wa_fmbs  LIKE LINE OF it_fmbs ,
it_fmbx  TYPE STANDARD TABLE OF SLIST_FMBS_TAB,"TABLES PARAM
wa_fmbx  LIKE LINE OF it_fmbx ,
it_fsel  TYPE STANDARD TABLE OF SLIST_FSEL_TAB,"TABLES PARAM
wa_fsel  LIKE LINE OF it_fsel ,
it_fpos  TYPE STANDARD TABLE OF SLIST_FPOS_TAB,"TABLES PARAM
wa_fpos  LIKE LINE OF it_fpos .

DATA(ld_fontsize_in_halfpoints) = 'some text here'.

DATA(ld_default_filename) = some text here
DATA(ld_no_colors) = 'Check type of data required'.
DATA(ld_no_dialog) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_list to it_list.

"populate fields of struture and append to itab
append wa_fmbs to it_fmbs.

"populate fields of struture and append to itab
append wa_fmbx to it_fmbx.

"populate fields of struture and append to itab
append wa_fsel to it_fsel.

"populate fields of struture and append to itab
append wa_fpos to it_fpos. . CALL FUNCTION 'LIST_CONVERT_TO_RTF' * EXPORTING * fontsize_in_halfpoints = ld_fontsize_in_halfpoints * default_filename = ld_default_filename * no_colors = ld_no_colors * no_dialog = ld_no_dialog IMPORTING actual_filename = ld_actual_filename TABLES list = it_list fmbs = it_fmbs fmbx = it_fmbx fsel = it_fsel * fpos = it_fpos EXCEPTIONS DOWNLOAD_FILE_WRITE_ERROR = 1 DOWNLOAD_NO_BATCH = 2 DOWNLOAD_UNKNOWN_ERROR = 3 . " LIST_CONVERT_TO_RTF
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_actual_filename  TYPE RLGRAP-FILENAME ,
ld_fontsize_in_halfpoints  TYPE STRING ,
it_list  TYPE STANDARD TABLE OF SLIST_LIST_TAB ,
wa_list  LIKE LINE OF it_list,
ld_default_filename  TYPE RLGRAP-FILENAME ,
it_fmbs  TYPE STANDARD TABLE OF SLIST_FMBS_TAB ,
wa_fmbs  LIKE LINE OF it_fmbs,
ld_no_colors  TYPE C ,
it_fmbx  TYPE STANDARD TABLE OF SLIST_FMBS_TAB ,
wa_fmbx  LIKE LINE OF it_fmbx,
ld_no_dialog  TYPE C ,
it_fsel  TYPE STANDARD TABLE OF SLIST_FSEL_TAB ,
wa_fsel  LIKE LINE OF it_fsel,
it_fpos  TYPE STANDARD TABLE OF SLIST_FPOS_TAB ,
wa_fpos  LIKE LINE OF it_fpos.

ld_fontsize_in_halfpoints = 'some text here'.

"populate fields of struture and append to itab
append wa_list to it_list.

ld_default_filename = some text here

"populate fields of struture and append to itab
append wa_fmbs to it_fmbs.
ld_no_colors = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_fmbx to it_fmbx.
ld_no_dialog = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_fsel to it_fsel.

"populate fields of struture and append to itab
append wa_fpos to it_fpos.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name LIST_CONVERT_TO_RTF or its description.