SAP Function Modules

GET_PRINT_PARAMETERS SAP Function module - Read, determine, change spool print parameters and archive parameters







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

Associated Function Group: SPRI
Released Date: 22.04.1996
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM GET_PRINT_PARAMETERS - GET PRINT PARAMETERS





CALL FUNCTION 'GET_PRINT_PARAMETERS' "Read, determine, change spool print parameters and archive parameters
* EXPORTING
*   archive_id = C_CHAR_UNKNOWN  " arc_params-archiv_id  Archive ID
*   archive_info = C_CHAR_UNKNOWN  " arc_params-info  Additional information for report names
*   archive_mode = C_CHAR_UNKNOWN  " pri_params-armod  Control of the printing and archiving
*   archive_text = C_CHAR_UNKNOWN  " arc_params-arctext  Info text for the archive request
*   ar_object = C_CHAR_UNKNOWN  " arc_params-ar_object  Archiving object
*   archive_report = C_CHAR_UNKNOWN  " arc_params-report  Archiving Report
*   authority = C_CHAR_UNKNOWN  " pri_params-prber  Default for 'authorization'
*   copies = C_NUM3_UNKNOWN     " pri_params-prcop
*   copies = C_NUM3_UNKNOWN     " pri_params-prcop  Default for 'number of copies'
*   cover_page = C_CHAR_UNKNOWN  " pri_params-prbig  Selection cover sheet output value
*   data_set = C_CHAR_UNKNOWN   " pri_params-prdsn  Default for name of the spool data
*   department = C_CHAR_UNKNOWN  " pri_params-prabt  Default for 'department'
*   destination = C_CHAR_UNKNOWN  " pri_params-pdest  Default for 'output device'
*   expiration = C_NUM1_UNKNOWN  " pri_params-pexpi  Default for 'retention period'
*   immediately = C_CHAR_UNKNOWN  " pri_params-primm  Default for 'Print immediately'
*   in_archive_parameters = SPACE  " arc_params  List of all archiving parameters
*   in_parameters = SPACE       " pri_params    List of all default parameters
*   layout = C_CHAR_UNKNOWN     " pri_params-paart
*   layout = C_CHAR_UNKNOWN     " pri_params-paart  Default for 'format'
*   line_count = C_INT_UNKNOWN  " pri_params-linct  Default for 'Rows'
*   line_size = C_INT_UNKNOWN   " pri_params-linsz  Default for 'columns'
*   list_name = C_CHAR_UNKNOWN  " pri_params-plist  Default for 'spool request name'
*   list_text = C_CHAR_UNKNOWN  " pri_params-prtxt  Default for 'spool request text'
*   mode = SPACE                " sy-callr      Mode: 'BATCH' or SPACE
*   mode = SPACE                " sy-callr
*   new_list_id = C_CHAR_UNKNOWN  " pri_params-prnew  Default for 'New spool request'
*   protect_list = C_CHAR_UNKNOWN  " pri_params-prnew  Cannot Append Any More to Generated Spool Request
*   no_dialog = C_FALSE         "               Suppress dialog
*   receiver = C_CHAR_UNKNOWN   " pri_params-prrec  Default for 'recipient'
*   release = C_CHAR_UNKNOWN    " pri_params-prrel
*   release = C_CHAR_UNKNOWN    " pri_params-prrel  Default for 'Keep after printing'
*   report = C_CHAR_UNKNOWN     " sy-repid      REPORT name
*   sap_cover_page = C_CHAR_UNKNOWN  " pri_params-prsap  Default for the output of the SAP cover sheet
*   host_cover_page = C_CHAR_UNKNOWN  " pri_params-prunx  Default for Output of Operating System Cover Sheet
*   priority = C_NUM1_UNKNOWN   " pri_params-priot  Default for Priority
*   sap_object = C_CHAR_UNKNOWN  " arc_params-sap_object  Name of the application for the archiving
*   type = C_CHAR_UNKNOWN       " pri_params-ptype  Default 'Spool request type'
*   type = C_CHAR_UNKNOWN       " pri_params-ptype
*   user = SY-UNAME             " sy-uname
*   use_old_layout = SPACE      "               Use Old List Format
*   uc_display_mode = C_CHAR_UNKNOWN  "         Unicode Print Layout
*   draft = C_CHAR_UNKNOWN      " pripar_ext-text  Print text only
*   abap_list = SPACE           "               Print ABAP List
*   use_archivename_def = SPACE  "              Note %_ARCHIVE-REPORT
*   default_spool_size = C_CHAR_UNKNOWN  "      Max. Width of Spool Request: 255 Characters
*   with_structure = C_CHAR_UNKNOWN  "          Print with Structure Information
*   suppress_shading = C_CHAR_UNKNOWN  "        Suppress Colors/Shading
*   po_fax_store = SPACE        " pri_params-primm  Print Immediately (Print Parameter)
*   no_frames = C_CHAR_UNKNOWN  "               No Frame Characters
  IMPORTING
    out_archive_parameters =    " arc_params    List of the called up archiving parameters
    out_parameters =            " pri_params    List of the called print parameter
    valid =                     "
    valid =                     "               Print parameters in OUT_PARAMETERS are valid
    valid_for_spool_creation =   "              Print parameters in OUT_PARAMETERS are valid for creating a spool request
  EXCEPTIONS
    ARCHIVE_INFO_NOT_FOUND = 1  "               Incorrect entries for archive or archive objects
    INVALID_PRINT_PARAMS = 2    "               no longer used
    INVALID_ARCHIVE_PARAMS = 3  "               no longer used
    .  "  GET_PRINT_PARAMETERS

ABAP code example for Function Module GET_PRINT_PARAMETERS





The ABAP code below is a full code listing to execute function module GET_PRINT_PARAMETERS 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_out_archive_parameters  TYPE ARC_PARAMS ,
ld_out_parameters  TYPE PRI_PARAMS ,
ld_valid  TYPE STRING ,
ld_valid  TYPE STRING ,
ld_valid_for_spool_creation  TYPE STRING .


DATA(ld_archive_id) = some text here

DATA(ld_archive_info) = some text here

DATA(ld_archive_mode) = some text here

DATA(ld_archive_text) = some text here

DATA(ld_ar_object) = some text here

DATA(ld_archive_report) = some text here

DATA(ld_authority) = some text here

DATA(ld_copies) = Check type of data required

DATA(ld_copies) = Check type of data required

DATA(ld_cover_page) = some text here

DATA(ld_data_set) = some text here

DATA(ld_department) = some text here

DATA(ld_destination) = some text here

DATA(ld_expiration) = Check type of data required

DATA(ld_immediately) = some text here
DATA(ld_in_archive_parameters) = 'Check type of data required'.
DATA(ld_in_parameters) = 'Check type of data required'.

DATA(ld_layout) = some text here

DATA(ld_layout) = some text here

DATA(ld_line_count) = 123

DATA(ld_line_size) = 123

DATA(ld_list_name) = some text here

DATA(ld_list_text) = some text here
DATA(ld_mode) = 'some text here'.
DATA(ld_mode) = 'some text here'.

DATA(ld_new_list_id) = some text here

DATA(ld_protect_list) = some text here
DATA(ld_no_dialog) = 'some text here'.

DATA(ld_receiver) = some text here

DATA(ld_release) = some text here

DATA(ld_release) = some text here
DATA(ld_report) = 'some text here'.

DATA(ld_sap_cover_page) = some text here

DATA(ld_host_cover_page) = some text here

DATA(ld_priority) = Check type of data required

DATA(ld_sap_object) = some text here

DATA(ld_type) = some text here

DATA(ld_type) = some text here
DATA(ld_user) = 'some text here'.
DATA(ld_use_old_layout) = 'some text here'.
DATA(ld_uc_display_mode) = 'some text here'.

DATA(ld_draft) = some text here
DATA(ld_abap_list) = 'some text here'.
DATA(ld_use_archivename_def) = 'some text here'.
DATA(ld_default_spool_size) = 'some text here'.
DATA(ld_with_structure) = 'some text here'.
DATA(ld_suppress_shading) = 'some text here'.

DATA(ld_po_fax_store) = some text here
DATA(ld_no_frames) = 'some text here'. . CALL FUNCTION 'GET_PRINT_PARAMETERS' * EXPORTING * archive_id = ld_archive_id * archive_info = ld_archive_info * archive_mode = ld_archive_mode * archive_text = ld_archive_text * ar_object = ld_ar_object * archive_report = ld_archive_report * authority = ld_authority * copies = ld_copies * copies = ld_copies * cover_page = ld_cover_page * data_set = ld_data_set * department = ld_department * destination = ld_destination * expiration = ld_expiration * immediately = ld_immediately * in_archive_parameters = ld_in_archive_parameters * in_parameters = ld_in_parameters * layout = ld_layout * layout = ld_layout * line_count = ld_line_count * line_size = ld_line_size * list_name = ld_list_name * list_text = ld_list_text * mode = ld_mode * mode = ld_mode * new_list_id = ld_new_list_id * protect_list = ld_protect_list * no_dialog = ld_no_dialog * receiver = ld_receiver * release = ld_release * release = ld_release * report = ld_report * sap_cover_page = ld_sap_cover_page * host_cover_page = ld_host_cover_page * priority = ld_priority * sap_object = ld_sap_object * type = ld_type * type = ld_type * user = ld_user * use_old_layout = ld_use_old_layout * uc_display_mode = ld_uc_display_mode * draft = ld_draft * abap_list = ld_abap_list * use_archivename_def = ld_use_archivename_def * default_spool_size = ld_default_spool_size * with_structure = ld_with_structure * suppress_shading = ld_suppress_shading * po_fax_store = ld_po_fax_store * no_frames = ld_no_frames IMPORTING out_archive_parameters = ld_out_archive_parameters out_parameters = ld_out_parameters valid = ld_valid valid = ld_valid valid_for_spool_creation = ld_valid_for_spool_creation EXCEPTIONS ARCHIVE_INFO_NOT_FOUND = 1 INVALID_PRINT_PARAMS = 2 INVALID_ARCHIVE_PARAMS = 3 . " GET_PRINT_PARAMETERS
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 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_out_archive_parameters  TYPE ARC_PARAMS ,
ld_archive_id  TYPE ARC_PARAMS-ARCHIV_ID ,
ld_out_parameters  TYPE PRI_PARAMS ,
ld_archive_info  TYPE ARC_PARAMS-INFO ,
ld_valid  TYPE STRING ,
ld_valid  TYPE STRING ,
ld_archive_mode  TYPE PRI_PARAMS-ARMOD ,
ld_valid_for_spool_creation  TYPE STRING ,
ld_archive_text  TYPE ARC_PARAMS-ARCTEXT ,
ld_ar_object  TYPE ARC_PARAMS-AR_OBJECT ,
ld_archive_report  TYPE ARC_PARAMS-REPORT ,
ld_authority  TYPE PRI_PARAMS-PRBER ,
ld_copies  TYPE PRI_PARAMS-PRCOP ,
ld_copies  TYPE PRI_PARAMS-PRCOP ,
ld_cover_page  TYPE PRI_PARAMS-PRBIG ,
ld_data_set  TYPE PRI_PARAMS-PRDSN ,
ld_department  TYPE PRI_PARAMS-PRABT ,
ld_destination  TYPE PRI_PARAMS-PDEST ,
ld_expiration  TYPE PRI_PARAMS-PEXPI ,
ld_immediately  TYPE PRI_PARAMS-PRIMM ,
ld_in_archive_parameters  TYPE ARC_PARAMS ,
ld_in_parameters  TYPE PRI_PARAMS ,
ld_layout  TYPE PRI_PARAMS-PAART ,
ld_layout  TYPE PRI_PARAMS-PAART ,
ld_line_count  TYPE PRI_PARAMS-LINCT ,
ld_line_size  TYPE PRI_PARAMS-LINSZ ,
ld_list_name  TYPE PRI_PARAMS-PLIST ,
ld_list_text  TYPE PRI_PARAMS-PRTXT ,
ld_mode  TYPE SY-CALLR ,
ld_mode  TYPE SY-CALLR ,
ld_new_list_id  TYPE PRI_PARAMS-PRNEW ,
ld_protect_list  TYPE PRI_PARAMS-PRNEW ,
ld_no_dialog  TYPE STRING ,
ld_receiver  TYPE PRI_PARAMS-PRREC ,
ld_release  TYPE PRI_PARAMS-PRREL ,
ld_release  TYPE PRI_PARAMS-PRREL ,
ld_report  TYPE SY-REPID ,
ld_sap_cover_page  TYPE PRI_PARAMS-PRSAP ,
ld_host_cover_page  TYPE PRI_PARAMS-PRUNX ,
ld_priority  TYPE PRI_PARAMS-PRIOT ,
ld_sap_object  TYPE ARC_PARAMS-SAP_OBJECT ,
ld_type  TYPE PRI_PARAMS-PTYPE ,
ld_type  TYPE PRI_PARAMS-PTYPE ,
ld_user  TYPE SY-UNAME ,
ld_use_old_layout  TYPE STRING ,
ld_uc_display_mode  TYPE STRING ,
ld_draft  TYPE PRIPAR_EXT-TEXT ,
ld_abap_list  TYPE STRING ,
ld_use_archivename_def  TYPE STRING ,
ld_default_spool_size  TYPE STRING ,
ld_with_structure  TYPE STRING ,
ld_suppress_shading  TYPE STRING ,
ld_po_fax_store  TYPE PRI_PARAMS-PRIMM ,
ld_no_frames  TYPE STRING .


ld_archive_id = some text here

ld_archive_info = some text here

ld_archive_mode = some text here

ld_archive_text = some text here

ld_ar_object = some text here

ld_archive_report = some text here

ld_authority = some text here

ld_copies = Check type of data required

ld_copies = Check type of data required

ld_cover_page = some text here

ld_data_set = some text here

ld_department = some text here

ld_destination = some text here

ld_expiration = Check type of data required

ld_immediately = some text here
ld_in_archive_parameters = 'some text here'.
ld_in_parameters = 'some text here'.

ld_layout = some text here

ld_layout = some text here

ld_line_count = 123

ld_line_size = 123

ld_list_name = some text here

ld_list_text = some text here
ld_mode = 'some text here'.
ld_mode = 'some text here'.

ld_new_list_id = some text here

ld_protect_list = some text here
ld_no_dialog = 'some text here'.

ld_receiver = some text here

ld_release = some text here

ld_release = some text here
ld_report = 'some text here'.

ld_sap_cover_page = some text here

ld_host_cover_page = some text here

ld_priority = Check type of data required

ld_sap_object = some text here

ld_type = some text here

ld_type = some text here
ld_user = 'some text here'.
ld_use_old_layout = 'some text here'.
ld_uc_display_mode = 'some text here'.

ld_draft = some text here
ld_abap_list = 'some text here'.
ld_use_archivename_def = 'some text here'.
ld_default_spool_size = 'some text here'.
ld_with_structure = 'some text here'.
ld_suppress_shading = 'some text here'.

ld_po_fax_store = some text here
ld_no_frames = 'some text here'.

SAP Documentation for FM GET_PRINT_PARAMETERS


The function module GET_PRINT_PARAMETERS is used to define, modify, and display the print and archive parameters. ...See here for full SAP fm documentation

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