SAP Function Modules

REPORT_EXPORT SAP Function module







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

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


Pattern for FM REPORT_EXPORT - REPORT EXPORT





CALL FUNCTION 'REPORT_EXPORT' "
  EXPORTING
*   code = 'EX'                 " cfcodes-m_export  Code
*   commit = SPACE              " c             'Commit Work' should be executed
    i_rkb1d =                   " rkb1d
    i_rkb1f =                   " rkb1f         Field string RKB1F
    i_rkb1x =                   " rkb1x         Field string RKB1E
    i_t_lcol =                  " rkd_t_lcol
  TABLES
    i_add_tab0 =                " cfba001       Table ADD_TAB0
    i_back_tab =                " cfback        Table BACK_TAB
    i_bed_tab =                 " cfbbe01
    i_excep_tab =               " cfexceptab    Table EXCEP_TAB (Exception Reporting)
    i_extxt_tab =               " cfextxttab    Table with indicators for exceptions
    i_form_tab =                " cfbfo01       Table FORM_TAB
    i_level_tab =               " cfleveltab    Table LEVEL_TAB (Exception Reporting)
    i_lrech =                   " cfblr01       Table LRECH
    i_options =                 " cfopttab
    i_port_tab =                " cfallarea     Table for portfolio graphics
    i_print =                   " cfbpr01       Table PRINT
    i_ps_tab =                  " cfbps01       Table PS_TAB
    i_seig =                    " cfbse01       Table SEIG
    i_sel_tab =                 " cedst         Table SEL_TAB
    i_sf_tab =                  " cfbsf01
    i_sh_tab =                  " cfbsh01
    i_sort_tab =                " cfsort        Table SORT_TAB
    i_summ_tab =                " cfbsr01       Table SUMM_TAB
    i_textparam_tab =           " cfbtp01       Table TEXTPARAM_TAB
    i_trace_tab =               " cftrace       Table TRACE_TAB
    i_var_tab =                 " cfbvp01       Table REPLACE_TAB
    i_zahld_tab =               " cfbzd01       Table ZAHLD_TAB
    i_zwert =                   " cfbzw01       Table ZWERT
    .  "  REPORT_EXPORT

ABAP code example for Function Module REPORT_EXPORT





The ABAP code below is a full code listing to execute function module REPORT_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:
it_i_add_tab0  TYPE STANDARD TABLE OF CFBA001,"TABLES PARAM
wa_i_add_tab0  LIKE LINE OF it_i_add_tab0 ,
it_i_back_tab  TYPE STANDARD TABLE OF CFBACK,"TABLES PARAM
wa_i_back_tab  LIKE LINE OF it_i_back_tab ,
it_i_bed_tab  TYPE STANDARD TABLE OF CFBBE01,"TABLES PARAM
wa_i_bed_tab  LIKE LINE OF it_i_bed_tab ,
it_i_excep_tab  TYPE STANDARD TABLE OF CFEXCEPTAB,"TABLES PARAM
wa_i_excep_tab  LIKE LINE OF it_i_excep_tab ,
it_i_extxt_tab  TYPE STANDARD TABLE OF CFEXTXTTAB,"TABLES PARAM
wa_i_extxt_tab  LIKE LINE OF it_i_extxt_tab ,
it_i_form_tab  TYPE STANDARD TABLE OF CFBFO01,"TABLES PARAM
wa_i_form_tab  LIKE LINE OF it_i_form_tab ,
it_i_level_tab  TYPE STANDARD TABLE OF CFLEVELTAB,"TABLES PARAM
wa_i_level_tab  LIKE LINE OF it_i_level_tab ,
it_i_lrech  TYPE STANDARD TABLE OF CFBLR01,"TABLES PARAM
wa_i_lrech  LIKE LINE OF it_i_lrech ,
it_i_options  TYPE STANDARD TABLE OF CFOPTTAB,"TABLES PARAM
wa_i_options  LIKE LINE OF it_i_options ,
it_i_port_tab  TYPE STANDARD TABLE OF CFALLAREA,"TABLES PARAM
wa_i_port_tab  LIKE LINE OF it_i_port_tab ,
it_i_print  TYPE STANDARD TABLE OF CFBPR01,"TABLES PARAM
wa_i_print  LIKE LINE OF it_i_print ,
it_i_ps_tab  TYPE STANDARD TABLE OF CFBPS01,"TABLES PARAM
wa_i_ps_tab  LIKE LINE OF it_i_ps_tab ,
it_i_seig  TYPE STANDARD TABLE OF CFBSE01,"TABLES PARAM
wa_i_seig  LIKE LINE OF it_i_seig ,
it_i_sel_tab  TYPE STANDARD TABLE OF CEDST,"TABLES PARAM
wa_i_sel_tab  LIKE LINE OF it_i_sel_tab ,
it_i_sf_tab  TYPE STANDARD TABLE OF CFBSF01,"TABLES PARAM
wa_i_sf_tab  LIKE LINE OF it_i_sf_tab ,
it_i_sh_tab  TYPE STANDARD TABLE OF CFBSH01,"TABLES PARAM
wa_i_sh_tab  LIKE LINE OF it_i_sh_tab ,
it_i_sort_tab  TYPE STANDARD TABLE OF CFSORT,"TABLES PARAM
wa_i_sort_tab  LIKE LINE OF it_i_sort_tab ,
it_i_summ_tab  TYPE STANDARD TABLE OF CFBSR01,"TABLES PARAM
wa_i_summ_tab  LIKE LINE OF it_i_summ_tab ,
it_i_textparam_tab  TYPE STANDARD TABLE OF CFBTP01,"TABLES PARAM
wa_i_textparam_tab  LIKE LINE OF it_i_textparam_tab ,
it_i_trace_tab  TYPE STANDARD TABLE OF CFTRACE,"TABLES PARAM
wa_i_trace_tab  LIKE LINE OF it_i_trace_tab ,
it_i_var_tab  TYPE STANDARD TABLE OF CFBVP01,"TABLES PARAM
wa_i_var_tab  LIKE LINE OF it_i_var_tab ,
it_i_zahld_tab  TYPE STANDARD TABLE OF CFBZD01,"TABLES PARAM
wa_i_zahld_tab  LIKE LINE OF it_i_zahld_tab ,
it_i_zwert  TYPE STANDARD TABLE OF CFBZW01,"TABLES PARAM
wa_i_zwert  LIKE LINE OF it_i_zwert .


DATA(ld_code) = some text here
DATA(ld_commit) = 'Check type of data required'.
DATA(ld_i_rkb1d) = 'Check type of data required'.
DATA(ld_i_rkb1f) = 'Check type of data required'.
DATA(ld_i_rkb1x) = 'Check type of data required'.
DATA(ld_i_t_lcol) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_add_tab0 to it_i_add_tab0.

"populate fields of struture and append to itab
append wa_i_back_tab to it_i_back_tab.

"populate fields of struture and append to itab
append wa_i_bed_tab to it_i_bed_tab.

"populate fields of struture and append to itab
append wa_i_excep_tab to it_i_excep_tab.

"populate fields of struture and append to itab
append wa_i_extxt_tab to it_i_extxt_tab.

"populate fields of struture and append to itab
append wa_i_form_tab to it_i_form_tab.

"populate fields of struture and append to itab
append wa_i_level_tab to it_i_level_tab.

"populate fields of struture and append to itab
append wa_i_lrech to it_i_lrech.

"populate fields of struture and append to itab
append wa_i_options to it_i_options.

"populate fields of struture and append to itab
append wa_i_port_tab to it_i_port_tab.

"populate fields of struture and append to itab
append wa_i_print to it_i_print.

"populate fields of struture and append to itab
append wa_i_ps_tab to it_i_ps_tab.

"populate fields of struture and append to itab
append wa_i_seig to it_i_seig.

"populate fields of struture and append to itab
append wa_i_sel_tab to it_i_sel_tab.

"populate fields of struture and append to itab
append wa_i_sf_tab to it_i_sf_tab.

"populate fields of struture and append to itab
append wa_i_sh_tab to it_i_sh_tab.

"populate fields of struture and append to itab
append wa_i_sort_tab to it_i_sort_tab.

"populate fields of struture and append to itab
append wa_i_summ_tab to it_i_summ_tab.

"populate fields of struture and append to itab
append wa_i_textparam_tab to it_i_textparam_tab.

"populate fields of struture and append to itab
append wa_i_trace_tab to it_i_trace_tab.

"populate fields of struture and append to itab
append wa_i_var_tab to it_i_var_tab.

"populate fields of struture and append to itab
append wa_i_zahld_tab to it_i_zahld_tab.

"populate fields of struture and append to itab
append wa_i_zwert to it_i_zwert. . CALL FUNCTION 'REPORT_EXPORT' EXPORTING * code = ld_code * commit = ld_commit i_rkb1d = ld_i_rkb1d i_rkb1f = ld_i_rkb1f i_rkb1x = ld_i_rkb1x i_t_lcol = ld_i_t_lcol TABLES i_add_tab0 = it_i_add_tab0 i_back_tab = it_i_back_tab i_bed_tab = it_i_bed_tab i_excep_tab = it_i_excep_tab i_extxt_tab = it_i_extxt_tab i_form_tab = it_i_form_tab i_level_tab = it_i_level_tab i_lrech = it_i_lrech i_options = it_i_options i_port_tab = it_i_port_tab i_print = it_i_print i_ps_tab = it_i_ps_tab i_seig = it_i_seig i_sel_tab = it_i_sel_tab i_sf_tab = it_i_sf_tab i_sh_tab = it_i_sh_tab i_sort_tab = it_i_sort_tab i_summ_tab = it_i_summ_tab i_textparam_tab = it_i_textparam_tab i_trace_tab = it_i_trace_tab i_var_tab = it_i_var_tab i_zahld_tab = it_i_zahld_tab i_zwert = it_i_zwert . " REPORT_EXPORT
IF SY-SUBRC EQ 0. "All OK 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_code  TYPE CFCODES-M_EXPORT ,
it_i_add_tab0  TYPE STANDARD TABLE OF CFBA001 ,
wa_i_add_tab0  LIKE LINE OF it_i_add_tab0,
ld_commit  TYPE C ,
it_i_back_tab  TYPE STANDARD TABLE OF CFBACK ,
wa_i_back_tab  LIKE LINE OF it_i_back_tab,
ld_i_rkb1d  TYPE RKB1D ,
it_i_bed_tab  TYPE STANDARD TABLE OF CFBBE01 ,
wa_i_bed_tab  LIKE LINE OF it_i_bed_tab,
ld_i_rkb1f  TYPE RKB1F ,
it_i_excep_tab  TYPE STANDARD TABLE OF CFEXCEPTAB ,
wa_i_excep_tab  LIKE LINE OF it_i_excep_tab,
ld_i_rkb1x  TYPE RKB1X ,
it_i_extxt_tab  TYPE STANDARD TABLE OF CFEXTXTTAB ,
wa_i_extxt_tab  LIKE LINE OF it_i_extxt_tab,
ld_i_t_lcol  TYPE RKD_T_LCOL ,
it_i_form_tab  TYPE STANDARD TABLE OF CFBFO01 ,
wa_i_form_tab  LIKE LINE OF it_i_form_tab,
it_i_level_tab  TYPE STANDARD TABLE OF CFLEVELTAB ,
wa_i_level_tab  LIKE LINE OF it_i_level_tab,
it_i_lrech  TYPE STANDARD TABLE OF CFBLR01 ,
wa_i_lrech  LIKE LINE OF it_i_lrech,
it_i_options  TYPE STANDARD TABLE OF CFOPTTAB ,
wa_i_options  LIKE LINE OF it_i_options,
it_i_port_tab  TYPE STANDARD TABLE OF CFALLAREA ,
wa_i_port_tab  LIKE LINE OF it_i_port_tab,
it_i_print  TYPE STANDARD TABLE OF CFBPR01 ,
wa_i_print  LIKE LINE OF it_i_print,
it_i_ps_tab  TYPE STANDARD TABLE OF CFBPS01 ,
wa_i_ps_tab  LIKE LINE OF it_i_ps_tab,
it_i_seig  TYPE STANDARD TABLE OF CFBSE01 ,
wa_i_seig  LIKE LINE OF it_i_seig,
it_i_sel_tab  TYPE STANDARD TABLE OF CEDST ,
wa_i_sel_tab  LIKE LINE OF it_i_sel_tab,
it_i_sf_tab  TYPE STANDARD TABLE OF CFBSF01 ,
wa_i_sf_tab  LIKE LINE OF it_i_sf_tab,
it_i_sh_tab  TYPE STANDARD TABLE OF CFBSH01 ,
wa_i_sh_tab  LIKE LINE OF it_i_sh_tab,
it_i_sort_tab  TYPE STANDARD TABLE OF CFSORT ,
wa_i_sort_tab  LIKE LINE OF it_i_sort_tab,
it_i_summ_tab  TYPE STANDARD TABLE OF CFBSR01 ,
wa_i_summ_tab  LIKE LINE OF it_i_summ_tab,
it_i_textparam_tab  TYPE STANDARD TABLE OF CFBTP01 ,
wa_i_textparam_tab  LIKE LINE OF it_i_textparam_tab,
it_i_trace_tab  TYPE STANDARD TABLE OF CFTRACE ,
wa_i_trace_tab  LIKE LINE OF it_i_trace_tab,
it_i_var_tab  TYPE STANDARD TABLE OF CFBVP01 ,
wa_i_var_tab  LIKE LINE OF it_i_var_tab,
it_i_zahld_tab  TYPE STANDARD TABLE OF CFBZD01 ,
wa_i_zahld_tab  LIKE LINE OF it_i_zahld_tab,
it_i_zwert  TYPE STANDARD TABLE OF CFBZW01 ,
wa_i_zwert  LIKE LINE OF it_i_zwert.


ld_code = some text here

"populate fields of struture and append to itab
append wa_i_add_tab0 to it_i_add_tab0.
ld_commit = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_back_tab to it_i_back_tab.
ld_i_rkb1d = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_bed_tab to it_i_bed_tab.
ld_i_rkb1f = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_excep_tab to it_i_excep_tab.
ld_i_rkb1x = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_extxt_tab to it_i_extxt_tab.
ld_i_t_lcol = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_form_tab to it_i_form_tab.

"populate fields of struture and append to itab
append wa_i_level_tab to it_i_level_tab.

"populate fields of struture and append to itab
append wa_i_lrech to it_i_lrech.

"populate fields of struture and append to itab
append wa_i_options to it_i_options.

"populate fields of struture and append to itab
append wa_i_port_tab to it_i_port_tab.

"populate fields of struture and append to itab
append wa_i_print to it_i_print.

"populate fields of struture and append to itab
append wa_i_ps_tab to it_i_ps_tab.

"populate fields of struture and append to itab
append wa_i_seig to it_i_seig.

"populate fields of struture and append to itab
append wa_i_sel_tab to it_i_sel_tab.

"populate fields of struture and append to itab
append wa_i_sf_tab to it_i_sf_tab.

"populate fields of struture and append to itab
append wa_i_sh_tab to it_i_sh_tab.

"populate fields of struture and append to itab
append wa_i_sort_tab to it_i_sort_tab.

"populate fields of struture and append to itab
append wa_i_summ_tab to it_i_summ_tab.

"populate fields of struture and append to itab
append wa_i_textparam_tab to it_i_textparam_tab.

"populate fields of struture and append to itab
append wa_i_trace_tab to it_i_trace_tab.

"populate fields of struture and append to itab
append wa_i_var_tab to it_i_var_tab.

"populate fields of struture and append to itab
append wa_i_zahld_tab to it_i_zahld_tab.

"populate fields of struture and append to itab
append wa_i_zwert to it_i_zwert.

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