SAP Function Modules

RS_SCREEN_EXPORT SAP Function module







RS_SCREEN_EXPORT 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 RS_SCREEN_EXPORT into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM RS_SCREEN_EXPORT - RS SCREEN EXPORT





CALL FUNCTION 'RS_SCREEN_EXPORT' "
  EXPORTING
    dynnr =                     " sy-dynnr
    dynnr =                     " sy-dynnr      Number of the screen                      NUMC 4
*   dynpro_text = ' '           " d020t-dtxt    Short text of screen                     CHAR 60
    h_export =                  " d020s         Screen header
    progname =                  " sy-repid      Name of the module pool/program           CHAR 8
*   dynpro_language = SY-LANGU  " sy-langu      Language of short text                    LANG
*   extend = ' '                " sy-calld      Customer enhancement mode ('X' -> yes)
*   save_without_question = ' '  " sy-calld     Save without query ('X'->yes)
*   i_korrnum = ' '             " korrnum
*   i_screen_painter =          " cl_wb_screen_painter  Screen Painter
*   without_corr_insert = ' '   " sy-calld
  IMPORTING
    saved =                     " sy-calld
    saved =                     " sy-calld      Save status ('X'=saved, ' ' other)
    e_korrnum =                 " e070-trkorr
  TABLES
    e_g =                       " dyn_flowlist  Screen flow logic
    f_g =                       " d021s         Field list for screen
    m_g =                       " d023s         Screen matchcode sub IDs
*   smodilog_dynp_g =           " smodilog_d    Customer enhancements
*   smodilog_abap_g =           " smodilog
*   smodisrc_prot_abap_g =      " smodi_mod_tab
  EXCEPTIONS
    CANCELED_BY_USER = 1        "               Save dialog box cancelled with F12
    .  "  RS_SCREEN_EXPORT

ABAP code example for Function Module RS_SCREEN_EXPORT





The ABAP code below is a full code listing to execute function module RS_SCREEN_EXPORT 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_saved  TYPE SY-CALLD ,
ld_saved  TYPE SY-CALLD ,
ld_e_korrnum  TYPE E070-TRKORR ,
it_e_g  TYPE STANDARD TABLE OF DYN_FLOWLIST,"TABLES PARAM
wa_e_g  LIKE LINE OF it_e_g ,
it_f_g  TYPE STANDARD TABLE OF D021S,"TABLES PARAM
wa_f_g  LIKE LINE OF it_f_g ,
it_m_g  TYPE STANDARD TABLE OF D023S,"TABLES PARAM
wa_m_g  LIKE LINE OF it_m_g ,
it_smodilog_dynp_g  TYPE STANDARD TABLE OF SMODILOG_D,"TABLES PARAM
wa_smodilog_dynp_g  LIKE LINE OF it_smodilog_dynp_g ,
it_smodilog_abap_g  TYPE STANDARD TABLE OF SMODILOG,"TABLES PARAM
wa_smodilog_abap_g  LIKE LINE OF it_smodilog_abap_g ,
it_smodisrc_prot_abap_g  TYPE STANDARD TABLE OF SMODI_MOD_TAB,"TABLES PARAM
wa_smodisrc_prot_abap_g  LIKE LINE OF it_smodisrc_prot_abap_g .

DATA(ld_dynnr) = 'some text here'.
DATA(ld_dynnr) = 'some text here'.

SELECT single DTXT
FROM D020T
INTO @DATA(ld_dynpro_text).

DATA(ld_h_export) = 'some text here'.
DATA(ld_progname) = 'some text here'.
DATA(ld_dynpro_language) = 'Check type of data required'.
DATA(ld_extend) = 'some text here'.
DATA(ld_save_without_question) = 'some text here'.
DATA(ld_i_korrnum) = 'some text here'.
DATA(ld_i_screen_painter) = 'some text here'.
DATA(ld_without_corr_insert) = 'some text here'.

"populate fields of struture and append to itab
append wa_e_g to it_e_g.

"populate fields of struture and append to itab
append wa_f_g to it_f_g.

"populate fields of struture and append to itab
append wa_m_g to it_m_g.

"populate fields of struture and append to itab
append wa_smodilog_dynp_g to it_smodilog_dynp_g.

"populate fields of struture and append to itab
append wa_smodilog_abap_g to it_smodilog_abap_g.

"populate fields of struture and append to itab
append wa_smodisrc_prot_abap_g to it_smodisrc_prot_abap_g. . CALL FUNCTION 'RS_SCREEN_EXPORT' EXPORTING dynnr = ld_dynnr dynnr = ld_dynnr * dynpro_text = ld_dynpro_text h_export = ld_h_export progname = ld_progname * dynpro_language = ld_dynpro_language * extend = ld_extend * save_without_question = ld_save_without_question * i_korrnum = ld_i_korrnum * i_screen_painter = ld_i_screen_painter * without_corr_insert = ld_without_corr_insert IMPORTING saved = ld_saved saved = ld_saved e_korrnum = ld_e_korrnum TABLES e_g = it_e_g f_g = it_f_g m_g = it_m_g * smodilog_dynp_g = it_smodilog_dynp_g * smodilog_abap_g = it_smodilog_abap_g * smodisrc_prot_abap_g = it_smodisrc_prot_abap_g EXCEPTIONS CANCELED_BY_USER = 1 . " RS_SCREEN_EXPORT
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "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_saved  TYPE SY-CALLD ,
ld_saved  TYPE SY-CALLD ,
ld_dynnr  TYPE SY-DYNNR ,
ld_dynnr  TYPE SY-DYNNR ,
it_e_g  TYPE STANDARD TABLE OF DYN_FLOWLIST ,
wa_e_g  LIKE LINE OF it_e_g,
ld_e_korrnum  TYPE E070-TRKORR ,
ld_dynpro_text  TYPE D020T-DTXT ,
it_f_g  TYPE STANDARD TABLE OF D021S ,
wa_f_g  LIKE LINE OF it_f_g,
ld_h_export  TYPE D020S ,
it_m_g  TYPE STANDARD TABLE OF D023S ,
wa_m_g  LIKE LINE OF it_m_g,
ld_progname  TYPE SY-REPID ,
it_smodilog_dynp_g  TYPE STANDARD TABLE OF SMODILOG_D ,
wa_smodilog_dynp_g  LIKE LINE OF it_smodilog_dynp_g,
ld_dynpro_language  TYPE SY-LANGU ,
it_smodilog_abap_g  TYPE STANDARD TABLE OF SMODILOG ,
wa_smodilog_abap_g  LIKE LINE OF it_smodilog_abap_g,
ld_extend  TYPE SY-CALLD ,
it_smodisrc_prot_abap_g  TYPE STANDARD TABLE OF SMODI_MOD_TAB ,
wa_smodisrc_prot_abap_g  LIKE LINE OF it_smodisrc_prot_abap_g,
ld_save_without_question  TYPE SY-CALLD ,
ld_i_korrnum  TYPE KORRNUM ,
ld_i_screen_painter  TYPE CL_WB_SCREEN_PAINTER ,
ld_without_corr_insert  TYPE SY-CALLD .

ld_dynnr = 'some text here'.
ld_dynnr = 'some text here'.

"populate fields of struture and append to itab
append wa_e_g to it_e_g.

SELECT single DTXT
FROM D020T
INTO ld_dynpro_text.


"populate fields of struture and append to itab
append wa_f_g to it_f_g.
ld_h_export = 'some text here'.

"populate fields of struture and append to itab
append wa_m_g to it_m_g.
ld_progname = 'some text here'.

"populate fields of struture and append to itab
append wa_smodilog_dynp_g to it_smodilog_dynp_g.
ld_dynpro_language = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_smodilog_abap_g to it_smodilog_abap_g.
ld_extend = 'some text here'.

"populate fields of struture and append to itab
append wa_smodisrc_prot_abap_g to it_smodisrc_prot_abap_g.
ld_save_without_question = 'some text here'.
ld_i_korrnum = 'some text here'.
ld_i_screen_painter = 'some text here'.
ld_without_corr_insert = 'some text here'.

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 RS_SCREEN_EXPORT or its description.