SAP EFG_PRINT Function Module for









EFG_PRINT is a standard efg print 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 efg print FM, simply by entering the name EFG_PRINT into the relevant SAP transaction such as SE37 or SE38.

Function Group: EFGP
Program Name: SAPLEFGP
Main Program: SAPLEFGP
Appliation area: E
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function EFG_PRINT 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 'EFG_PRINT'"
EXPORTING
* X_HEADER = "
* REF_LOG = CL_EFG_LOG_NULL=>S "
* I_FLG_EMSG = '+' "
X_PRINTPARAMS = "Print Parameter
* X_ARCHIVE_INDEX = "Archive parameters
* X_ARCHIVE_PARAMS = "Archive parameters
* X_DIALOG = 'X' "
* X_RECIPIENT = "
* X_SENDER = "
* X_STRN_COLLINFO = "Information of Calling Collection
* X_TABN_SEL_PER_FCLASS = "Selection for Form Class

IMPORTING
Y_ITCPP = "Output structure
Y_RDI_RESULT = "
Y_PRINTPARAMS = "
Y_SF_RESULT = "Smart Forms: Return value at end of form printing
Y_TAB_GENDATA = "Table for Generic Data
Y_TABN_SEL_PER_FCLASS = "Selections per Form Class
Y_PDF_RESULT = "
Y_LANGU = "

TABLES
XT_RANGES = "Selection table
* XT_RANGES9 = "
* YT_OTF_DATA = "
* XT_RANGES1 = "
* XT_RANGES2 = "
* XT_RANGES3 = "
* XT_RANGES4 = "
* XT_RANGES5 = "
* XT_RANGES6 = "
* XT_RANGES7 = "
* XT_RANGES8 = "

EXCEPTIONS
NOT_QUALIFIED = 1 FORMCLASS_NOT_FOUND = 2 FORM_NOT_FOUND = 3 FORMCLASS_INVALID = 4 PRINT_FAILED = 5 FORM_INVALID = 6 CANCELLED = 7
.



IMPORTING Parameters details for EFG_PRINT

X_HEADER -

Data type: RFGEN-HEADER
Optional: Yes
Call by Reference: No ( called with pass by value option)

REF_LOG -

Data type: IF_EFG_LOG
Default: CL_EFG_LOG_NULL=>S
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_FLG_EMSG -

Data type: EMSG_USAGE_FLAG
Default: '+'
Optional: Yes
Call by Reference: No ( called with pass by value option)

X_PRINTPARAMS - Print Parameter

Data type: EPRINTPARAMS
Optional: No
Call by Reference: No ( called with pass by value option)

X_ARCHIVE_INDEX - Archive parameters

Data type: TOA_DARA
Optional: Yes
Call by Reference: No ( called with pass by value option)

X_ARCHIVE_PARAMS - Archive parameters

Data type: ARC_PARAMS
Optional: Yes
Call by Reference: No ( called with pass by value option)

X_DIALOG -

Data type: RFGEN-DIALOG
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

X_RECIPIENT -

Data type: SWOTOBJID
Optional: Yes
Call by Reference: No ( called with pass by value option)

X_SENDER -

Data type: SWOTOBJID
Optional: Yes
Call by Reference: No ( called with pass by value option)

X_STRN_COLLINFO - Information of Calling Collection

Data type: EFG_STRN_COLLECTION_INFO
Optional: Yes
Call by Reference: No ( called with pass by value option)

X_TABN_SEL_PER_FCLASS - Selection for Form Class

Data type: EFG_TABN_SEL_PER_FCLASS
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for EFG_PRINT

Y_ITCPP - Output structure

Data type: ITCPP
Optional: No
Call by Reference: No ( called with pass by value option)

Y_RDI_RESULT -

Data type: RDIRESULT
Optional: No
Call by Reference: No ( called with pass by value option)

Y_PRINTPARAMS -

Data type: EPRINTPARAMS
Optional: No
Call by Reference: No ( called with pass by value option)

Y_SF_RESULT - Smart Forms: Return value at end of form printing

Data type: SSFCRESCL
Optional: No
Call by Reference: No ( called with pass by value option)

Y_TAB_GENDATA - Table for Generic Data

Data type: EFG_TAB_GENDATA
Optional: No
Call by Reference: No ( called with pass by value option)

Y_TABN_SEL_PER_FCLASS - Selections per Form Class

Data type: EFG_TABN_SEL_PER_FCLASS
Optional: No
Call by Reference: No ( called with pass by value option)

Y_PDF_RESULT -

Data type: EFG_STRN_PDF_RESULT
Optional: No
Call by Reference: No ( called with pass by value option)

Y_LANGU -

Data type: SY-LANGU
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for EFG_PRINT

XT_RANGES - Selection table

Data type: EFG_RANGES
Optional: No
Call by Reference: No ( called with pass by value option)

XT_RANGES9 -

Data type: EFG_RANGES
Optional: Yes
Call by Reference: No ( called with pass by value option)

YT_OTF_DATA -

Data type: ITCOO
Optional: Yes
Call by Reference: No ( called with pass by value option)

XT_RANGES1 -

Data type: EFG_RANGES
Optional: Yes
Call by Reference: No ( called with pass by value option)

XT_RANGES2 -

Data type: EFG_RANGES
Optional: Yes
Call by Reference: No ( called with pass by value option)

XT_RANGES3 -

Data type: EFG_RANGES
Optional: Yes
Call by Reference: No ( called with pass by value option)

XT_RANGES4 -

Data type: EFG_RANGES
Optional: Yes
Call by Reference: No ( called with pass by value option)

XT_RANGES5 -

Data type: EFG_RANGES
Optional: Yes
Call by Reference: No ( called with pass by value option)

XT_RANGES6 -

Data type: EFG_RANGES
Optional: Yes
Call by Reference: No ( called with pass by value option)

XT_RANGES7 -

Data type: EFG_RANGES
Optional: Yes
Call by Reference: No ( called with pass by value option)

XT_RANGES8 -

Data type: EFG_RANGES
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

NOT_QUALIFIED -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

FORMCLASS_NOT_FOUND -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

FORM_NOT_FOUND -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

FORMCLASS_INVALID -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

PRINT_FAILED -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

FORM_INVALID -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

CANCELLED -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for EFG_PRINT 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_y_itcpp  TYPE ITCPP, "   
lv_x_header  TYPE RFGEN-HEADER, "   
lt_xt_ranges  TYPE STANDARD TABLE OF EFG_RANGES, "   
lv_not_qualified  TYPE EFG_RANGES, "   
lv_ref_log  TYPE IF_EFG_LOG, "   CL_EFG_LOG_NULL=>S
lt_xt_ranges9  TYPE STANDARD TABLE OF EFG_RANGES, "   
lv_i_flg_emsg  TYPE EMSG_USAGE_FLAG, "   '+'
lt_yt_otf_data  TYPE STANDARD TABLE OF ITCOO, "   
lt_xt_ranges1  TYPE STANDARD TABLE OF EFG_RANGES, "   
lv_y_rdi_result  TYPE RDIRESULT, "   
lv_x_printparams  TYPE EPRINTPARAMS, "   
lv_formclass_not_found  TYPE EPRINTPARAMS, "   
lt_xt_ranges2  TYPE STANDARD TABLE OF EFG_RANGES, "   
lv_y_printparams  TYPE EPRINTPARAMS, "   
lv_form_not_found  TYPE EPRINTPARAMS, "   
lv_x_archive_index  TYPE TOA_DARA, "   
lt_xt_ranges3  TYPE STANDARD TABLE OF EFG_RANGES, "   
lv_y_sf_result  TYPE SSFCRESCL, "   
lv_x_archive_params  TYPE ARC_PARAMS, "   
lv_formclass_invalid  TYPE ARC_PARAMS, "   
lv_x_dialog  TYPE RFGEN-DIALOG, "   'X'
lt_xt_ranges4  TYPE STANDARD TABLE OF EFG_RANGES, "   
lv_print_failed  TYPE EFG_RANGES, "   
lv_y_tab_gendata  TYPE EFG_TAB_GENDATA, "   
lt_xt_ranges5  TYPE STANDARD TABLE OF EFG_RANGES, "   
lv_x_recipient  TYPE SWOTOBJID, "   
lv_form_invalid  TYPE SWOTOBJID, "   
lv_y_tabn_sel_per_fclass  TYPE EFG_TABN_SEL_PER_FCLASS, "   
lv_x_sender  TYPE SWOTOBJID, "   
lv_cancelled  TYPE SWOTOBJID, "   
lt_xt_ranges6  TYPE STANDARD TABLE OF EFG_RANGES, "   
lv_y_pdf_result  TYPE EFG_STRN_PDF_RESULT, "   
lv_y_langu  TYPE SY-LANGU, "   
lt_xt_ranges7  TYPE STANDARD TABLE OF EFG_RANGES, "   
lv_x_strn_collinfo  TYPE EFG_STRN_COLLECTION_INFO, "   
lt_xt_ranges8  TYPE STANDARD TABLE OF EFG_RANGES, "   
lv_x_tabn_sel_per_fclass  TYPE EFG_TABN_SEL_PER_FCLASS. "   

  CALL FUNCTION 'EFG_PRINT'  "
    EXPORTING
         X_HEADER = lv_x_header
         REF_LOG = lv_ref_log
         I_FLG_EMSG = lv_i_flg_emsg
         X_PRINTPARAMS = lv_x_printparams
         X_ARCHIVE_INDEX = lv_x_archive_index
         X_ARCHIVE_PARAMS = lv_x_archive_params
         X_DIALOG = lv_x_dialog
         X_RECIPIENT = lv_x_recipient
         X_SENDER = lv_x_sender
         X_STRN_COLLINFO = lv_x_strn_collinfo
         X_TABN_SEL_PER_FCLASS = lv_x_tabn_sel_per_fclass
    IMPORTING
         Y_ITCPP = lv_y_itcpp
         Y_RDI_RESULT = lv_y_rdi_result
         Y_PRINTPARAMS = lv_y_printparams
         Y_SF_RESULT = lv_y_sf_result
         Y_TAB_GENDATA = lv_y_tab_gendata
         Y_TABN_SEL_PER_FCLASS = lv_y_tabn_sel_per_fclass
         Y_PDF_RESULT = lv_y_pdf_result
         Y_LANGU = lv_y_langu
    TABLES
         XT_RANGES = lt_xt_ranges
         XT_RANGES9 = lt_xt_ranges9
         YT_OTF_DATA = lt_yt_otf_data
         XT_RANGES1 = lt_xt_ranges1
         XT_RANGES2 = lt_xt_ranges2
         XT_RANGES3 = lt_xt_ranges3
         XT_RANGES4 = lt_xt_ranges4
         XT_RANGES5 = lt_xt_ranges5
         XT_RANGES6 = lt_xt_ranges6
         XT_RANGES7 = lt_xt_ranges7
         XT_RANGES8 = lt_xt_ranges8
    EXCEPTIONS
        NOT_QUALIFIED = 1
        FORMCLASS_NOT_FOUND = 2
        FORM_NOT_FOUND = 3
        FORMCLASS_INVALID = 4
        PRINT_FAILED = 5
        FORM_INVALID = 6
        CANCELLED = 7
. " EFG_PRINT




ABAP code using 7.40 inline data declarations to call FM EFG_PRINT

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 HEADER FROM RFGEN INTO @DATA(ld_x_header).
 
 
 
DATA(ld_ref_log) = CL_EFG_LOG_NULL=>S.
 
 
DATA(ld_i_flg_emsg) = '+'.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
"SELECT single DIALOG FROM RFGEN INTO @DATA(ld_x_dialog).
DATA(ld_x_dialog) = 'X'.
 
 
 
 
 
 
 
 
 
 
 
 
"SELECT single LANGU FROM SY INTO @DATA(ld_y_langu).
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!