SAP REPORT_IMPORT Function Module for
REPORT_IMPORT is a standard report import 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 report import FM, simply by entering the name REPORT_IMPORT into the relevant SAP transaction such as SE37 or SE38.
Function Group: KYP2
Program Name: SAPLKYP2
Main Program: SAPLKYP2
Appliation area: K
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function REPORT_IMPORT 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 'REPORT_IMPORT'".
EXPORTING
* I_MANDT = SY-MANDT "
* SEVERITY = 'S' "Error message when locking
* ENQUEUE_FLAG = 'X' "See FB RKD_REPORT_IMPORT_C
APPLCLASS = "Application class
REPID = "Report name
SUBCLASS = "Subgroup
TABNAME = "Table name
I_RKB1X = "
* I_IMPORT_MODE = '0' "See FB RKD_REPORT_IMPORT_C
* FORM = "Form
* SUBCLASSF = "Sub class of the form
IMPORTING
E_RKB1F = "Field string RKB1F
E_RKB1X = "Field string RKB1E
E_ENQUEUE = "See FB RKD_REPORT_IMPORT_C
E_T_LCOL = "
TABLES
* E_ADD_TAB0 = "Table ADD_TAB0
* E_PORT_TAB = "Table for portfolio graphics
* E_PRINT = "Table PRINT
* E_PS_TAB = "Table PS_TAB
* E_SEIG = "Table SEIG
* E_SEL_TAB = "Table SEL_TAB
* E_SF_TAB = "
* E_SH_TAB = "
* E_SORT_TAB = "Table SORT_TAB
* E_SUMM_TAB = "Table SUMM_TAB
* E_TEXTPARAM_TAB = "Table TEXTPARAM_TAB
* E_BACK_TAB = "Table BACK_TAB
* E_TRACE_TAB = "Table TRACE_TAB
* E_VAR_TAB = "Table REPLACE_TAB
* E_ZAHLD_TAB = "Table ZAHLD_TAB
* E_ZWERT = "Table ZWERT
* E_BED_TAB = "
* E_EXCEP_TAB = "Table EXCEP_TAB (Exception Reporting)
* E_EXTXT_TAB = "Text table for the reports
* E_FORM_TAB = "Table FORM_TAB
* E_LEVEL_TAB = "Table LEVEL_TAB (Exception Reporting)
* E_LRECH = "Table LRECH
* E_OPTIONS = "Option table for the graphics
EXCEPTIONS
ERROR_BY_IMPORTING = 1
IMPORTING Parameters details for REPORT_IMPORT
I_MANDT -
Data type: SY-MANDTDefault: SY-MANDT
Optional: Yes
Call by Reference: No ( called with pass by value option)
SEVERITY - Error message when locking
Data type: CDefault: 'S'
Optional: Yes
Call by Reference: No ( called with pass by value option)
ENQUEUE_FLAG - See FB RKD_REPORT_IMPORT_C
Data type: CDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
APPLCLASS - Application class
Data type: RKB1D-APPLCLASSOptional: No
Call by Reference: No ( called with pass by value option)
REPID - Report name
Data type: RKB1D-REPIDOptional: No
Call by Reference: No ( called with pass by value option)
SUBCLASS - Subgroup
Data type: RKB1D-SUBCLASSOptional: No
Call by Reference: No ( called with pass by value option)
TABNAME - Table name
Data type: RKB1D-TABNAMEOptional: No
Call by Reference: No ( called with pass by value option)
I_RKB1X -
Data type: RKB1XOptional: No
Call by Reference: No ( called with pass by value option)
I_IMPORT_MODE - See FB RKD_REPORT_IMPORT_C
Data type: CDefault: '0'
Optional: Yes
Call by Reference: No ( called with pass by value option)
FORM - Form
Data type: RKB1D-FORMOptional: Yes
Call by Reference: No ( called with pass by value option)
SUBCLASSF - Sub class of the form
Data type: RKB1D-SUBCLASSFOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for REPORT_IMPORT
E_RKB1F - Field string RKB1F
Data type: RKB1FOptional: No
Call by Reference: No ( called with pass by value option)
E_RKB1X - Field string RKB1E
Data type: RKB1XOptional: No
Call by Reference: No ( called with pass by value option)
E_ENQUEUE - See FB RKD_REPORT_IMPORT_C
Data type: IOptional: No
Call by Reference: No ( called with pass by value option)
E_T_LCOL -
Data type: RKD_T_LCOLOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for REPORT_IMPORT
E_ADD_TAB0 - Table ADD_TAB0
Data type: CFBA001Optional: Yes
Call by Reference: No ( called with pass by value option)
E_PORT_TAB - Table for portfolio graphics
Data type: CFALLAREAOptional: Yes
Call by Reference: No ( called with pass by value option)
E_PRINT - Table PRINT
Data type: CFBPR01Optional: Yes
Call by Reference: No ( called with pass by value option)
E_PS_TAB - Table PS_TAB
Data type: CFBPS01Optional: Yes
Call by Reference: No ( called with pass by value option)
E_SEIG - Table SEIG
Data type: CFBSE01Optional: Yes
Call by Reference: No ( called with pass by value option)
E_SEL_TAB - Table SEL_TAB
Data type: CEDSTOptional: Yes
Call by Reference: No ( called with pass by value option)
E_SF_TAB -
Data type: CFBSF01Optional: Yes
Call by Reference: No ( called with pass by value option)
E_SH_TAB -
Data type: CFBSH01Optional: Yes
Call by Reference: No ( called with pass by value option)
E_SORT_TAB - Table SORT_TAB
Data type: CFSORTOptional: Yes
Call by Reference: No ( called with pass by value option)
E_SUMM_TAB - Table SUMM_TAB
Data type: CFBSR01Optional: Yes
Call by Reference: No ( called with pass by value option)
E_TEXTPARAM_TAB - Table TEXTPARAM_TAB
Data type: CFBTP01Optional: Yes
Call by Reference: No ( called with pass by value option)
E_BACK_TAB - Table BACK_TAB
Data type: CFBACKOptional: Yes
Call by Reference: No ( called with pass by value option)
E_TRACE_TAB - Table TRACE_TAB
Data type: CFTRACEOptional: Yes
Call by Reference: No ( called with pass by value option)
E_VAR_TAB - Table REPLACE_TAB
Data type: CFBVP01Optional: Yes
Call by Reference: Yes
E_ZAHLD_TAB - Table ZAHLD_TAB
Data type: CFBZD01Optional: Yes
Call by Reference: No ( called with pass by value option)
E_ZWERT - Table ZWERT
Data type: CFBZW01Optional: Yes
Call by Reference: No ( called with pass by value option)
E_BED_TAB -
Data type: CFBBE01Optional: Yes
Call by Reference: No ( called with pass by value option)
E_EXCEP_TAB - Table EXCEP_TAB (Exception Reporting)
Data type: CFEXCEPTABOptional: Yes
Call by Reference: No ( called with pass by value option)
E_EXTXT_TAB - Text table for the reports
Data type: CFEXTXTTABOptional: Yes
Call by Reference: No ( called with pass by value option)
E_FORM_TAB - Table FORM_TAB
Data type: CFBFO01Optional: Yes
Call by Reference: No ( called with pass by value option)
E_LEVEL_TAB - Table LEVEL_TAB (Exception Reporting)
Data type: CFLEVELTABOptional: Yes
Call by Reference: No ( called with pass by value option)
E_LRECH - Table LRECH
Data type: CFBLR01Optional: Yes
Call by Reference: No ( called with pass by value option)
E_OPTIONS - Option table for the graphics
Data type: CFOPTTABOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
ERROR_BY_IMPORTING - Report could not be imported
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for REPORT_IMPORT 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_e_rkb1f | TYPE RKB1F, " | |||
lv_i_mandt | TYPE SY-MANDT, " SY-MANDT | |||
lt_e_add_tab0 | TYPE STANDARD TABLE OF CFBA001, " | |||
lv_error_by_importing | TYPE CFBA001, " | |||
lv_severity | TYPE C, " 'S' | |||
lt_e_port_tab | TYPE STANDARD TABLE OF CFALLAREA, " | |||
lt_e_print | TYPE STANDARD TABLE OF CFBPR01, " | |||
lv_enqueue_flag | TYPE C, " 'X' | |||
lt_e_ps_tab | TYPE STANDARD TABLE OF CFBPS01, " | |||
lt_e_seig | TYPE STANDARD TABLE OF CFBSE01, " | |||
lt_e_sel_tab | TYPE STANDARD TABLE OF CEDST, " | |||
lt_e_sf_tab | TYPE STANDARD TABLE OF CFBSF01, " | |||
lt_e_sh_tab | TYPE STANDARD TABLE OF CFBSH01, " | |||
lt_e_sort_tab | TYPE STANDARD TABLE OF CFSORT, " | |||
lt_e_summ_tab | TYPE STANDARD TABLE OF CFBSR01, " | |||
lt_e_textparam_tab | TYPE STANDARD TABLE OF CFBTP01, " | |||
lv_e_rkb1x | TYPE RKB1X, " | |||
lv_applclass | TYPE RKB1D-APPLCLASS, " | |||
lt_e_back_tab | TYPE STANDARD TABLE OF CFBACK, " | |||
lt_e_trace_tab | TYPE STANDARD TABLE OF CFTRACE, " | |||
lt_e_var_tab | TYPE STANDARD TABLE OF CFBVP01, " | |||
lt_e_zahld_tab | TYPE STANDARD TABLE OF CFBZD01, " | |||
lt_e_zwert | TYPE STANDARD TABLE OF CFBZW01, " | |||
lv_repid | TYPE RKB1D-REPID, " | |||
lt_e_bed_tab | TYPE STANDARD TABLE OF CFBBE01, " | |||
lv_e_enqueue | TYPE I, " | |||
lv_e_t_lcol | TYPE RKD_T_LCOL, " | |||
lv_subclass | TYPE RKB1D-SUBCLASS, " | |||
lt_e_excep_tab | TYPE STANDARD TABLE OF CFEXCEPTAB, " | |||
lv_tabname | TYPE RKB1D-TABNAME, " | |||
lt_e_extxt_tab | TYPE STANDARD TABLE OF CFEXTXTTAB, " | |||
lv_i_rkb1x | TYPE RKB1X, " | |||
lt_e_form_tab | TYPE STANDARD TABLE OF CFBFO01, " | |||
lt_e_level_tab | TYPE STANDARD TABLE OF CFLEVELTAB, " | |||
lv_i_import_mode | TYPE C, " '0' | |||
lv_form | TYPE RKB1D-FORM, " | |||
lt_e_lrech | TYPE STANDARD TABLE OF CFBLR01, " | |||
lt_e_options | TYPE STANDARD TABLE OF CFOPTTAB, " | |||
lv_subclassf | TYPE RKB1D-SUBCLASSF. " |
  CALL FUNCTION 'REPORT_IMPORT' " |
EXPORTING | ||
I_MANDT | = lv_i_mandt | |
SEVERITY | = lv_severity | |
ENQUEUE_FLAG | = lv_enqueue_flag | |
APPLCLASS | = lv_applclass | |
REPID | = lv_repid | |
SUBCLASS | = lv_subclass | |
TABNAME | = lv_tabname | |
I_RKB1X | = lv_i_rkb1x | |
I_IMPORT_MODE | = lv_i_import_mode | |
FORM | = lv_form | |
SUBCLASSF | = lv_subclassf | |
IMPORTING | ||
E_RKB1F | = lv_e_rkb1f | |
E_RKB1X | = lv_e_rkb1x | |
E_ENQUEUE | = lv_e_enqueue | |
E_T_LCOL | = lv_e_t_lcol | |
TABLES | ||
E_ADD_TAB0 | = lt_e_add_tab0 | |
E_PORT_TAB | = lt_e_port_tab | |
E_PRINT | = lt_e_print | |
E_PS_TAB | = lt_e_ps_tab | |
E_SEIG | = lt_e_seig | |
E_SEL_TAB | = lt_e_sel_tab | |
E_SF_TAB | = lt_e_sf_tab | |
E_SH_TAB | = lt_e_sh_tab | |
E_SORT_TAB | = lt_e_sort_tab | |
E_SUMM_TAB | = lt_e_summ_tab | |
E_TEXTPARAM_TAB | = lt_e_textparam_tab | |
E_BACK_TAB | = lt_e_back_tab | |
E_TRACE_TAB | = lt_e_trace_tab | |
E_VAR_TAB | = lt_e_var_tab | |
E_ZAHLD_TAB | = lt_e_zahld_tab | |
E_ZWERT | = lt_e_zwert | |
E_BED_TAB | = lt_e_bed_tab | |
E_EXCEP_TAB | = lt_e_excep_tab | |
E_EXTXT_TAB | = lt_e_extxt_tab | |
E_FORM_TAB | = lt_e_form_tab | |
E_LEVEL_TAB | = lt_e_level_tab | |
E_LRECH | = lt_e_lrech | |
E_OPTIONS | = lt_e_options | |
EXCEPTIONS | ||
ERROR_BY_IMPORTING = 1 | ||
. " REPORT_IMPORT |
ABAP code using 7.40 inline data declarations to call FM REPORT_IMPORT
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."SELECT single MANDT FROM SY INTO @DATA(ld_i_mandt). | ||||
DATA(ld_i_mandt) | = SY-MANDT. | |||
DATA(ld_severity) | = 'S'. | |||
DATA(ld_enqueue_flag) | = 'X'. | |||
"SELECT single APPLCLASS FROM RKB1D INTO @DATA(ld_applclass). | ||||
"SELECT single REPID FROM RKB1D INTO @DATA(ld_repid). | ||||
"SELECT single SUBCLASS FROM RKB1D INTO @DATA(ld_subclass). | ||||
"SELECT single TABNAME FROM RKB1D INTO @DATA(ld_tabname). | ||||
DATA(ld_i_import_mode) | = '0'. | |||
"SELECT single FORM FROM RKB1D INTO @DATA(ld_form). | ||||
"SELECT single SUBCLASSF FROM RKB1D INTO @DATA(ld_subclassf). | ||||
Search for further information about these or an SAP related objects