SAP Function Modules

EFG_PRINT_EXPANDED SAP Function module







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

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


Pattern for FM EFG_PRINT_EXPANDED - EFG PRINT EXPANDED





CALL FUNCTION 'EFG_PRINT_EXPANDED' "
  EXPORTING
    x_printparams =             " eprintparams
*   x_header =                  " rfgen-header  Header Data
*   x_sendcontrol =             " esendcontrol-sendcontrol  Dispatch Control
    x_rec_addr =                " addr1_val-addrnumber
    x_rec_persnumber =          " ad_persnum    Person Number
*   x_archive_params =          " arc_params    Archive parameters
*   x_archive_index =           " toa_dara      Archive parameters
*   x_recipient =               " swotobjid
*   x_tabn_sel_per_fclass =     " efg_tabn_sel_per_fclass
*   ref_log = CL_EFG_LOG_NULL=>S  " if_efg_log
*   i_flg_emsg = '+'            " emsg_usage_flag
  IMPORTING
    y_printparams =             " eprintparams
    y_itcpp =                   " itcpp         SAPscript output parameters
    y_rdi_result =              " rdiresult     SAPscript RDI: Return strctre in session not equal to spool
    y_sf_result =               " ssfcrescl     Smart Forms: Return value at end of form printing
    y_tab_gendata =             " efg_tab_gendata  Table for Generic Data
    y_pdf_result =              " efg_strn_pdf_result
* TABLES
*   xt_ranges =                 " efg_ranges    Value Table 0
*   xt_ranges1 =                " efg_ranges    Value Table 1
*   xt_ranges2 =                " efg_ranges    Value Table 2
*   xt_ranges3 =                " efg_ranges    Value Table 3
*   xt_ranges4 =                " efg_ranges    Value Table 4
*   xt_ranges5 =                " efg_ranges    Value Table 5
*   xt_ranges6 =                " efg_ranges    Value Table 6
*   xt_ranges7 =                " efg_ranges    Value Table 7
*   xt_ranges8 =                " efg_ranges    Value Table 8
*   xt_ranges9 =                " efg_ranges    Value Table 9
*   yt_otf_data =               " itcoo
  EXCEPTIONS
    NOT_QUALIFIED = 1           "
    PRINT_FAILED = 2            "
    CANCELLED = 3               "               Canceled by user
    REC_ADDR_NOT_FOUND = 4      "
    SEND_ADDR_NOT_FOUND = 5     "
    INPUT_ERROR = 6             "
    .  "  EFG_PRINT_EXPANDED

ABAP code example for Function Module EFG_PRINT_EXPANDED





The ABAP code below is a full code listing to execute function module EFG_PRINT_EXPANDED 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_y_printparams  TYPE EPRINTPARAMS ,
ld_y_itcpp  TYPE ITCPP ,
ld_y_rdi_result  TYPE RDIRESULT ,
ld_y_sf_result  TYPE SSFCRESCL ,
ld_y_tab_gendata  TYPE EFG_TAB_GENDATA ,
ld_y_pdf_result  TYPE EFG_STRN_PDF_RESULT ,
it_xt_ranges  TYPE STANDARD TABLE OF EFG_RANGES,"TABLES PARAM
wa_xt_ranges  LIKE LINE OF it_xt_ranges ,
it_xt_ranges1  TYPE STANDARD TABLE OF EFG_RANGES,"TABLES PARAM
wa_xt_ranges1  LIKE LINE OF it_xt_ranges1 ,
it_xt_ranges2  TYPE STANDARD TABLE OF EFG_RANGES,"TABLES PARAM
wa_xt_ranges2  LIKE LINE OF it_xt_ranges2 ,
it_xt_ranges3  TYPE STANDARD TABLE OF EFG_RANGES,"TABLES PARAM
wa_xt_ranges3  LIKE LINE OF it_xt_ranges3 ,
it_xt_ranges4  TYPE STANDARD TABLE OF EFG_RANGES,"TABLES PARAM
wa_xt_ranges4  LIKE LINE OF it_xt_ranges4 ,
it_xt_ranges5  TYPE STANDARD TABLE OF EFG_RANGES,"TABLES PARAM
wa_xt_ranges5  LIKE LINE OF it_xt_ranges5 ,
it_xt_ranges6  TYPE STANDARD TABLE OF EFG_RANGES,"TABLES PARAM
wa_xt_ranges6  LIKE LINE OF it_xt_ranges6 ,
it_xt_ranges7  TYPE STANDARD TABLE OF EFG_RANGES,"TABLES PARAM
wa_xt_ranges7  LIKE LINE OF it_xt_ranges7 ,
it_xt_ranges8  TYPE STANDARD TABLE OF EFG_RANGES,"TABLES PARAM
wa_xt_ranges8  LIKE LINE OF it_xt_ranges8 ,
it_xt_ranges9  TYPE STANDARD TABLE OF EFG_RANGES,"TABLES PARAM
wa_xt_ranges9  LIKE LINE OF it_xt_ranges9 ,
it_yt_otf_data  TYPE STANDARD TABLE OF ITCOO,"TABLES PARAM
wa_yt_otf_data  LIKE LINE OF it_yt_otf_data .

DATA(ld_x_printparams) = 'Check type of data required'.

DATA(ld_x_header) = some text here

SELECT single SENDCONTROL
FROM ESENDCONTROL
INTO @DATA(ld_x_sendcontrol).


DATA(ld_x_rec_addr) = some text here
DATA(ld_x_rec_persnumber) = 'Check type of data required'.
DATA(ld_x_archive_params) = 'Check type of data required'.
DATA(ld_x_archive_index) = 'Check type of data required'.
DATA(ld_x_recipient) = 'Check type of data required'.
DATA(ld_x_tabn_sel_per_fclass) = 'Check type of data required'.
DATA(ld_ref_log) = 'Check type of data required'.
DATA(ld_i_flg_emsg) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_xt_ranges to it_xt_ranges.

"populate fields of struture and append to itab
append wa_xt_ranges1 to it_xt_ranges1.

"populate fields of struture and append to itab
append wa_xt_ranges2 to it_xt_ranges2.

"populate fields of struture and append to itab
append wa_xt_ranges3 to it_xt_ranges3.

"populate fields of struture and append to itab
append wa_xt_ranges4 to it_xt_ranges4.

"populate fields of struture and append to itab
append wa_xt_ranges5 to it_xt_ranges5.

"populate fields of struture and append to itab
append wa_xt_ranges6 to it_xt_ranges6.

"populate fields of struture and append to itab
append wa_xt_ranges7 to it_xt_ranges7.

"populate fields of struture and append to itab
append wa_xt_ranges8 to it_xt_ranges8.

"populate fields of struture and append to itab
append wa_xt_ranges9 to it_xt_ranges9.

"populate fields of struture and append to itab
append wa_yt_otf_data to it_yt_otf_data. . CALL FUNCTION 'EFG_PRINT_EXPANDED' EXPORTING x_printparams = ld_x_printparams * x_header = ld_x_header * x_sendcontrol = ld_x_sendcontrol x_rec_addr = ld_x_rec_addr x_rec_persnumber = ld_x_rec_persnumber * x_archive_params = ld_x_archive_params * x_archive_index = ld_x_archive_index * x_recipient = ld_x_recipient * x_tabn_sel_per_fclass = ld_x_tabn_sel_per_fclass * ref_log = ld_ref_log * i_flg_emsg = ld_i_flg_emsg IMPORTING y_printparams = ld_y_printparams y_itcpp = ld_y_itcpp y_rdi_result = ld_y_rdi_result y_sf_result = ld_y_sf_result y_tab_gendata = ld_y_tab_gendata y_pdf_result = ld_y_pdf_result * TABLES * xt_ranges = it_xt_ranges * xt_ranges1 = it_xt_ranges1 * xt_ranges2 = it_xt_ranges2 * xt_ranges3 = it_xt_ranges3 * xt_ranges4 = it_xt_ranges4 * xt_ranges5 = it_xt_ranges5 * xt_ranges6 = it_xt_ranges6 * xt_ranges7 = it_xt_ranges7 * xt_ranges8 = it_xt_ranges8 * xt_ranges9 = it_xt_ranges9 * yt_otf_data = it_yt_otf_data EXCEPTIONS NOT_QUALIFIED = 1 PRINT_FAILED = 2 CANCELLED = 3 REC_ADDR_NOT_FOUND = 4 SEND_ADDR_NOT_FOUND = 5 INPUT_ERROR = 6 . " EFG_PRINT_EXPANDED
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 ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "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_y_printparams  TYPE EPRINTPARAMS ,
ld_x_printparams  TYPE EPRINTPARAMS ,
it_xt_ranges  TYPE STANDARD TABLE OF EFG_RANGES ,
wa_xt_ranges  LIKE LINE OF it_xt_ranges,
ld_y_itcpp  TYPE ITCPP ,
ld_x_header  TYPE RFGEN-HEADER ,
it_xt_ranges1  TYPE STANDARD TABLE OF EFG_RANGES ,
wa_xt_ranges1  LIKE LINE OF it_xt_ranges1,
ld_y_rdi_result  TYPE RDIRESULT ,
ld_x_sendcontrol  TYPE ESENDCONTROL-SENDCONTROL ,
it_xt_ranges2  TYPE STANDARD TABLE OF EFG_RANGES ,
wa_xt_ranges2  LIKE LINE OF it_xt_ranges2,
ld_y_sf_result  TYPE SSFCRESCL ,
ld_x_rec_addr  TYPE ADDR1_VAL-ADDRNUMBER ,
it_xt_ranges3  TYPE STANDARD TABLE OF EFG_RANGES ,
wa_xt_ranges3  LIKE LINE OF it_xt_ranges3,
ld_y_tab_gendata  TYPE EFG_TAB_GENDATA ,
ld_x_rec_persnumber  TYPE AD_PERSNUM ,
it_xt_ranges4  TYPE STANDARD TABLE OF EFG_RANGES ,
wa_xt_ranges4  LIKE LINE OF it_xt_ranges4,
it_xt_ranges5  TYPE STANDARD TABLE OF EFG_RANGES ,
wa_xt_ranges5  LIKE LINE OF it_xt_ranges5,
ld_x_archive_params  TYPE ARC_PARAMS ,
ld_y_pdf_result  TYPE EFG_STRN_PDF_RESULT ,
it_xt_ranges6  TYPE STANDARD TABLE OF EFG_RANGES ,
wa_xt_ranges6  LIKE LINE OF it_xt_ranges6,
ld_x_archive_index  TYPE TOA_DARA ,
it_xt_ranges7  TYPE STANDARD TABLE OF EFG_RANGES ,
wa_xt_ranges7  LIKE LINE OF it_xt_ranges7,
ld_x_recipient  TYPE SWOTOBJID ,
it_xt_ranges8  TYPE STANDARD TABLE OF EFG_RANGES ,
wa_xt_ranges8  LIKE LINE OF it_xt_ranges8,
ld_x_tabn_sel_per_fclass  TYPE EFG_TABN_SEL_PER_FCLASS ,
it_xt_ranges9  TYPE STANDARD TABLE OF EFG_RANGES ,
wa_xt_ranges9  LIKE LINE OF it_xt_ranges9,
ld_ref_log  TYPE IF_EFG_LOG ,
it_yt_otf_data  TYPE STANDARD TABLE OF ITCOO ,
wa_yt_otf_data  LIKE LINE OF it_yt_otf_data,
ld_i_flg_emsg  TYPE EMSG_USAGE_FLAG .

ld_x_printparams = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_xt_ranges to it_xt_ranges.

ld_x_header = some text here

"populate fields of struture and append to itab
append wa_xt_ranges1 to it_xt_ranges1.

SELECT single SENDCONTROL
FROM ESENDCONTROL
INTO ld_x_sendcontrol.


"populate fields of struture and append to itab
append wa_xt_ranges2 to it_xt_ranges2.

ld_x_rec_addr = some text here

"populate fields of struture and append to itab
append wa_xt_ranges3 to it_xt_ranges3.
ld_x_rec_persnumber = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_xt_ranges4 to it_xt_ranges4.

"populate fields of struture and append to itab
append wa_xt_ranges5 to it_xt_ranges5.
ld_x_archive_params = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_xt_ranges6 to it_xt_ranges6.
ld_x_archive_index = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_xt_ranges7 to it_xt_ranges7.
ld_x_recipient = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_xt_ranges8 to it_xt_ranges8.
ld_x_tabn_sel_per_fclass = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_xt_ranges9 to it_xt_ranges9.
ld_ref_log = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_yt_otf_data to it_yt_otf_data.
ld_i_flg_emsg = 'Check type of data required'.

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