<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic GET_PRINT_PARAMETERS in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-print-parameters/m-p/1080110#M97580</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Group,&lt;/P&gt;&lt;P&gt;I have an ALV report output( using CL_GUI_ALV_GRID) on custom screen. I have several screen elements on the screen. I created 'print'(function code 'DRUC') on menu bar for GUI status for that screen. And following is relevant code in PAI. When I print it Print Parameter screen popped up, I gave the correct printer name in output device and hit continue. But the report is not printing. in FM, v_valid was set to 'X' after execution. Can somebody tell me what is wrong here? Thank You&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHEN 'DRUC'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: v_uname LIKE sy-uname,&lt;/P&gt;&lt;P&gt;    v_valid.&lt;/P&gt;&lt;P&gt;    DATA: it_pri_params TYPE pri_params,&lt;/P&gt;&lt;P&gt;          it_arc_params TYPE arc_params.&lt;/P&gt;&lt;P&gt;    v_uname = sy-uname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'GET_PRINT_PARAMETERS'&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;P&gt;       archive_mode                  = '1'&lt;/P&gt;&lt;P&gt;        copies                       = 001&lt;/P&gt;&lt;P&gt;        immediately                  = 'X'&lt;/P&gt;&lt;P&gt;       layout                       = 'X_65_132'&lt;/P&gt;&lt;P&gt;       line_count                   = 65&lt;/P&gt;&lt;P&gt;       line_size                    = 132&lt;/P&gt;&lt;P&gt;       receiver                     = v_uname&lt;/P&gt;&lt;P&gt;       user                         = v_uname&lt;/P&gt;&lt;P&gt;   IMPORTING&lt;/P&gt;&lt;P&gt;     out_archive_parameters       = it_arc_params&lt;/P&gt;&lt;P&gt;     out_parameters               = it_pri_params&lt;/P&gt;&lt;P&gt;     valid                        = v_valid&lt;/P&gt;&lt;P&gt;   EXCEPTIONS&lt;/P&gt;&lt;P&gt;     archive_info_not_found       = 1&lt;/P&gt;&lt;P&gt;     invalid_print_params         = 2&lt;/P&gt;&lt;P&gt;     invalid_archive_params       = 3&lt;/P&gt;&lt;P&gt;     OTHERS                       = 4.              &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF v_valid &amp;lt;&amp;gt; space.&lt;/P&gt;&lt;P&gt;      IF it_arc_params IS INITIAL.&lt;/P&gt;&lt;P&gt;        NEW-PAGE PRINT ON PARAMETERS it_pri_params NO DIALOG.&lt;/P&gt;&lt;P&gt;      ELSE.&lt;/P&gt;&lt;P&gt;        NEW-PAGE PRINT ON ARCHIVE PARAMETERS it_arc_params PARAMETERS it_pri_params NO DIALOG.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Chandra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Nov 2005 20:23:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-11-10T20:23:54Z</dc:date>
    <item>
      <title>GET_PRINT_PARAMETERS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-print-parameters/m-p/1080110#M97580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Group,&lt;/P&gt;&lt;P&gt;I have an ALV report output( using CL_GUI_ALV_GRID) on custom screen. I have several screen elements on the screen. I created 'print'(function code 'DRUC') on menu bar for GUI status for that screen. And following is relevant code in PAI. When I print it Print Parameter screen popped up, I gave the correct printer name in output device and hit continue. But the report is not printing. in FM, v_valid was set to 'X' after execution. Can somebody tell me what is wrong here? Thank You&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHEN 'DRUC'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: v_uname LIKE sy-uname,&lt;/P&gt;&lt;P&gt;    v_valid.&lt;/P&gt;&lt;P&gt;    DATA: it_pri_params TYPE pri_params,&lt;/P&gt;&lt;P&gt;          it_arc_params TYPE arc_params.&lt;/P&gt;&lt;P&gt;    v_uname = sy-uname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'GET_PRINT_PARAMETERS'&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;P&gt;       archive_mode                  = '1'&lt;/P&gt;&lt;P&gt;        copies                       = 001&lt;/P&gt;&lt;P&gt;        immediately                  = 'X'&lt;/P&gt;&lt;P&gt;       layout                       = 'X_65_132'&lt;/P&gt;&lt;P&gt;       line_count                   = 65&lt;/P&gt;&lt;P&gt;       line_size                    = 132&lt;/P&gt;&lt;P&gt;       receiver                     = v_uname&lt;/P&gt;&lt;P&gt;       user                         = v_uname&lt;/P&gt;&lt;P&gt;   IMPORTING&lt;/P&gt;&lt;P&gt;     out_archive_parameters       = it_arc_params&lt;/P&gt;&lt;P&gt;     out_parameters               = it_pri_params&lt;/P&gt;&lt;P&gt;     valid                        = v_valid&lt;/P&gt;&lt;P&gt;   EXCEPTIONS&lt;/P&gt;&lt;P&gt;     archive_info_not_found       = 1&lt;/P&gt;&lt;P&gt;     invalid_print_params         = 2&lt;/P&gt;&lt;P&gt;     invalid_archive_params       = 3&lt;/P&gt;&lt;P&gt;     OTHERS                       = 4.              &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF v_valid &amp;lt;&amp;gt; space.&lt;/P&gt;&lt;P&gt;      IF it_arc_params IS INITIAL.&lt;/P&gt;&lt;P&gt;        NEW-PAGE PRINT ON PARAMETERS it_pri_params NO DIALOG.&lt;/P&gt;&lt;P&gt;      ELSE.&lt;/P&gt;&lt;P&gt;        NEW-PAGE PRINT ON ARCHIVE PARAMETERS it_arc_params PARAMETERS it_pri_params NO DIALOG.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Chandra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Nov 2005 20:23:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-print-parameters/m-p/1080110#M97580</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-10T20:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: GET_PRINT_PARAMETERS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-print-parameters/m-p/1080111#M97581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; try with this. It is working fine for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;list_name     = sy-repid.&lt;/P&gt;&lt;P&gt;    call function 'GET_PRINT_PARAMETERS'&lt;/P&gt;&lt;P&gt;      exporting&lt;/P&gt;&lt;P&gt;        no_dialog              = 'X'&lt;/P&gt;&lt;P&gt;        list_name              = list_name&lt;/P&gt;&lt;P&gt;        mode                   = 'CURRENT'&lt;/P&gt;&lt;P&gt;      importing&lt;/P&gt;&lt;P&gt;        out_parameters         = pri_param&lt;/P&gt;&lt;P&gt;        out_archive_parameters = arc_param.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    new-page  print on  parameters pri_param&lt;/P&gt;&lt;P&gt;                 archive parameters arc_param  no dialog.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Nov 2005 20:33:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-print-parameters/m-p/1080111#M97581</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-10T20:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: GET_PRINT_PARAMETERS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-print-parameters/m-p/1080112#M97582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use this :&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'GET_PRINT_PARAMETERS'&lt;/P&gt;&lt;P&gt;    EXPORTING DESTINATION           = USR01-SPLD&lt;/P&gt;&lt;P&gt;              LIST_NAME             = 'SY_REPID(please place ur program name here) '&lt;/P&gt;&lt;P&gt;              LIST_TEXT             = 'REPORT'&lt;/P&gt;&lt;P&gt;              IMMEDIATELY           = 'X'&lt;/P&gt;&lt;P&gt;              RELEASE               = ' '&lt;/P&gt;&lt;P&gt;              EXPIRATION            = DAYS&lt;/P&gt;&lt;P&gt;              LINE_SIZE             = 120&lt;/P&gt;&lt;P&gt;              LINE_COUNT            = 44&lt;/P&gt;&lt;P&gt;    IMPORTING OUT_PARAMETERS        = it_pri_params&lt;/P&gt;&lt;P&gt;              VALID                 = VALID.  (Blank )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why don't you Use SAP Standard GuI Command &amp;amp;RNT to your user command. Then Print will be executed in SAP routine . There is no need to write/ add another user command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Lanka Murthy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Nov 2005 20:37:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-print-parameters/m-p/1080112#M97582</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-10T20:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: GET_PRINT_PARAMETERS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-print-parameters/m-p/1080113#M97583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using all the parameters and new FCODE but still no luck. Any further suggestions please?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chandra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Nov 2005 21:26:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-print-parameters/m-p/1080113#M97583</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-10T21:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: GET_PRINT_PARAMETERS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-print-parameters/m-p/1080114#M97584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See this sample code and change accordingly&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*Print parameter declarations
DATA: val(1) TYPE c,
      pripar TYPE pri_params,
      arcpar TYPE arc_params,
      lay   TYPE pri_params-paart,
      lines TYPE pri_params-linct,
      rows  TYPE pri_params-linsz.


  lay = 'X_65_255'.
  lines = 255.
  rows  = 65.

CALL FUNCTION 'GET_PRINT_PARAMETERS'
       EXPORTING
            in_archive_parameters  = arcpar
            in_parameters          = pripar
            layout                 = lay
*            line_count             = lines
*            line_size              = rows
*            no_dialog              = 'X'
       IMPORTING
            out_archive_parameters = arcpar
            out_parameters         = pripar
            valid                  = val
       EXCEPTIONS
            archive_info_not_found = 1
            invalid_print_params   = 2
            invalid_archive_params = 3
            OTHERS                 = 4.

check val EQ 'X'.
NEW-PAGE PRINT ON
    NEW-SECTION
    PARAMETERS pripar
    ARCHIVE PARAMETERS arcpar
    NO DIALOG.

Write:/ 'Hello'.

NEW-PAGE PRINT OFF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2005 04:02:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-print-parameters/m-p/1080114#M97584</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-11T04:02:37Z</dc:date>
    </item>
    <item>
      <title>Re: GET_PRINT_PARAMETERS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-print-parameters/m-p/1080115#M97585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the function module GET_PRINT_PARAMETERS.&lt;/P&gt;&lt;P&gt;Documentation for that is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Functionality&lt;/P&gt;&lt;P&gt;The function module GET_PRINT_PARAMETERS is used to define, modify and display the print and archive parameters. Using this function module is the only correct way to modify a print or archive parameter record. The print parameters are closely related and contain a check total. This check total becomes invalid if any of the print parameters are changed and causes a runtime error when the print parameters are used later.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The required parameters are defined in the structure IN_PARAMETERS or IN_ARCHIVE_PARAMETERS. These input parameters must originate from another call of GET_PRINT_PARAMETERS or must be initial. The resulting print and archive parameters are returned with the function parameters OUT_PARAMETERS or OUT_ARCHIVE_PARAMETERS. The remaining IMPORT parameters, such as DESTINATION, LIST_NAME etc., are used to define the values to be passed to OUT_PARAMETERS or OUT_ARCHIVE_PARAMETERS. The output parameter VALID has the value BLANK in an interactive call if the user canceled the print screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the function module with dialog (parameter NO_DIALOG = SPACE) or without dialog. If you use a dialog, a screen appears on which the user can change the print parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: The "Print from page to page" option on the screen is not suitable for printing from ABAP programs, and is therefore not part of the structure PRI_PARAMS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The module recognizes the following modes (values of parameter MODE):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'PARAM'  Normal case. Define the print parameters for the &lt;/P&gt;&lt;P&gt; current program. The values that are not defined &lt;/P&gt;&lt;P&gt; are specified from the user master record or are &lt;/P&gt;&lt;P&gt; assigned default values. The print parameter screen &lt;/P&gt;&lt;P&gt; displays the PRINT key. This mode is used &lt;/P&gt;&lt;P&gt; if the MODE parameter is not specified. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;'PARAMSEL' Like PARAMS, except that the print parameter screen &lt;/P&gt;&lt;P&gt; includes an option to activate the selection screen. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;'BATCH'  Define the print parameters for a background job. &lt;/P&gt;&lt;P&gt; In this mode, the name of the report to be started &lt;/P&gt;&lt;P&gt; is passed with the REPORT parameter.The REPORT &lt;/P&gt;&lt;P&gt; statement of the specified report is checked for &lt;/P&gt;&lt;P&gt; LINE-SIZE and LINE-COUNT definitions. These &lt;/P&gt;&lt;P&gt; definitions are passed as default specifications. &lt;/P&gt;&lt;P&gt; Furthermore, the SAVE key is offered &lt;/P&gt;&lt;P&gt; instead of the PRINT key in this mode. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;'CURRENT'  Define the current valid print parameters: &lt;/P&gt;&lt;P&gt; These parameters come from the following sources: &lt;/P&gt;&lt;P&gt; 1.) From the user-specific print parameters &lt;/P&gt;&lt;P&gt; 2.) From the LINECOUNT and LINESIZE additions in &lt;/P&gt;&lt;P&gt;     the REPORT statement &lt;/P&gt;&lt;P&gt; 3.) If the report is running in the background or &lt;/P&gt;&lt;P&gt;     with Execute and Print, from the print parameters &lt;/P&gt;&lt;P&gt;     passed from the report. &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt; Otherwise it behaves as with PARAMSEL. In general, you should &lt;/P&gt;&lt;P&gt;                                                                     set import parameter NO_DIALOG in this modus, &lt;/P&gt;&lt;P&gt;                                                                   becausethis mode is only pointful, if it is run in the background. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;'DEFVALS'  Display for the default values. &lt;/P&gt;&lt;P&gt; Some of the default values are stored in the user defaults, &lt;/P&gt;&lt;P&gt; others can be maintained specifically for users and reports &lt;/P&gt;&lt;P&gt; using System -&amp;gt; List -&amp;gt; Print -&amp;gt; User-specific print &lt;/P&gt;&lt;P&gt; parameters. &lt;/P&gt;&lt;P&gt; The sytem returns the values for the current user and &lt;/P&gt;&lt;P&gt; report. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;'DISPLAY'  Displays the print parameters passed. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IMPORTANT:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In DEFVALS mode, the fields in out_parameters that are not contained in the user defaults are initial (type unknown). This means that the fields are not considered if out_parameters is passed again in a subsequent call of GET_PRINT_PARAMETERS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In all other modes, all fields of out_parameters are filled with values (possibly default values). This means that the fields are considered if out_parameters is passed in a subsequent call of GET_PRINT_PARAMETERS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should normally query the value of VALID. It has the possible values TRUE and FALSE. If it is FALSE, the user has either canceled the print dialog, or the function module has been called with parameters that cannot be used to print properly (for example, printing in the background on a frontend printer).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Normal definition                                                                                of the print parameters&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: PARAMS LIKE PRI_PARAMS,&lt;/P&gt;&lt;P&gt;      VALID  TYPE C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GET_PRINT_PARAMETERS'&lt;/P&gt;&lt;P&gt;  EXPORTING DESTINATION           = 'LT50'&lt;/P&gt;&lt;P&gt;  IMPORTING OUT_PARAMETERS        = PARAMS&lt;/P&gt;&lt;P&gt;             VALID                 = VALID.&lt;/P&gt;&lt;P&gt;IF VALID &amp;lt;&amp;gt; SPACE.&lt;/P&gt;&lt;P&gt;  NEW-PAGE PRINT ON PARAMETERS PARAMS.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Definition of the parameters for printing and archiving&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: PRI_PARAMS LIKE PRI_PARAMS,&lt;/P&gt;&lt;P&gt;      ARC_PARAMS LIKE ARC_PARAMS,&lt;/P&gt;&lt;P&gt;      VALID      TYPE C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GET_PRINT_PARAMETERS'&lt;/P&gt;&lt;P&gt;  IMPORTING OUT_PARAMETERS         = PRI_PARAMS&lt;/P&gt;&lt;P&gt;            OUT_ARCHIVE_PARAMETERS = ARC_PARAMS&lt;/P&gt;&lt;P&gt;             VALID                  = VALID.&lt;/P&gt;&lt;P&gt;IF VALID &amp;lt;&amp;gt; SPACE.&lt;/P&gt;&lt;P&gt;  NEW-PAGE PRINT ON PARAMETERS         PRI_PARAMS&lt;/P&gt;&lt;P&gt;                     ARCHIVE PARAMETERS ARC_PARAMS.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Definition of the parameters for a background job&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: PARAMS LIKE PRI_PARAMS,&lt;/P&gt;&lt;P&gt;      VALID  TYPE C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GET_PRINT_PARAMETERS'&lt;/P&gt;&lt;P&gt;  EXPORTING MODE                  = 'BATCH'&lt;/P&gt;&lt;P&gt;              REPORT                = 'MYREPORT'&lt;/P&gt;&lt;P&gt;  IMPORTING OUT_PARAMETERS        = PARAMS&lt;/P&gt;&lt;P&gt;              VALID                 = VALID.&lt;/P&gt;&lt;P&gt;IF VALID &amp;lt;&amp;gt; SPACE.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'JOB_OPEN' ....  EXPORTING JOBCOUNT ...&lt;/P&gt;&lt;P&gt;  SUBMIT MYREPORT VIA JOB 'MY_JOB' NUMBER JOBCOUNT&lt;/P&gt;&lt;P&gt;         TO SAP-SPOOL WITHOUT SPOOL DYNPRO&lt;/P&gt;&lt;P&gt;            SPOOL PARAMTERS PARAMS.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'JOB_CLOSE' ...&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Modifying the print parameters&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION 'GET_PRINT_PARAMETERS'       "Obtain print&lt;/P&gt;&lt;P&gt;  EXPORTING NO_DIALOG             = 'X'    "parameters&lt;/P&gt;&lt;P&gt;  IMPORTING OUT_PARAMETERS        = PARAMS.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GET_PRINT_PARAMETERS'       "Modify print&lt;/P&gt;&lt;P&gt;  EXPORTING NO_DIALOG             = 'X'    "parameters&lt;/P&gt;&lt;P&gt;            IN_PARAMETERS         = PARAMS&lt;/P&gt;&lt;P&gt;              LIST_NAME             = 'NEW-LIST'&lt;/P&gt;&lt;P&gt;  IMPORTING OUT_PARAMETERS        = PARAMS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters&lt;/P&gt;&lt;P&gt;ARCHIVE_ID&lt;/P&gt;&lt;P&gt;ARCHIVE_INFO&lt;/P&gt;&lt;P&gt;ARCHIVE_MODE&lt;/P&gt;&lt;P&gt;ARCHIVE_TEXT&lt;/P&gt;&lt;P&gt;AR_OBJECT&lt;/P&gt;&lt;P&gt;ARCHIVE_REPORT&lt;/P&gt;&lt;P&gt;AUTHORITY&lt;/P&gt;&lt;P&gt;COPIES&lt;/P&gt;&lt;P&gt;COVER_PAGE&lt;/P&gt;&lt;P&gt;DATA_SET&lt;/P&gt;&lt;P&gt;DEPARTMENT&lt;/P&gt;&lt;P&gt;DESTINATION&lt;/P&gt;&lt;P&gt;EXPIRATION&lt;/P&gt;&lt;P&gt;IMMEDIATELY&lt;/P&gt;&lt;P&gt;IN_ARCHIVE_PARAMETERS&lt;/P&gt;&lt;P&gt;IN_PARAMETERS&lt;/P&gt;&lt;P&gt;LAYOUT&lt;/P&gt;&lt;P&gt;LINE_COUNT&lt;/P&gt;&lt;P&gt;LINE_SIZE&lt;/P&gt;&lt;P&gt;LIST_NAME&lt;/P&gt;&lt;P&gt;LIST_TEXT&lt;/P&gt;&lt;P&gt;MODE&lt;/P&gt;&lt;P&gt;NEW_LIST_ID&lt;/P&gt;&lt;P&gt;PROTECT_LIST&lt;/P&gt;&lt;P&gt;NO_DIALOG&lt;/P&gt;&lt;P&gt;RECEIVER&lt;/P&gt;&lt;P&gt;RELEASE&lt;/P&gt;&lt;P&gt;REPORT&lt;/P&gt;&lt;P&gt;SAP_COVER_PAGE&lt;/P&gt;&lt;P&gt;HOST_COVER_PAGE&lt;/P&gt;&lt;P&gt;PRIORITY&lt;/P&gt;&lt;P&gt;SAP_OBJECT&lt;/P&gt;&lt;P&gt;TYPE&lt;/P&gt;&lt;P&gt;USER&lt;/P&gt;&lt;P&gt;USE_OLD_LAYOUT&lt;/P&gt;&lt;P&gt;UC_DISPLAY_MODE&lt;/P&gt;&lt;P&gt;DRAFT&lt;/P&gt;&lt;P&gt;ABAP_LIST&lt;/P&gt;&lt;P&gt;USE_ARCHIVENAME_DEF&lt;/P&gt;&lt;P&gt;DEFAULT_SPOOL_SIZE&lt;/P&gt;&lt;P&gt;PO_FAX_STORE&lt;/P&gt;&lt;P&gt;NO_FRAMES&lt;/P&gt;&lt;P&gt;OUT_ARCHIVE_PARAMETERS&lt;/P&gt;&lt;P&gt;OUT_PARAMETERS&lt;/P&gt;&lt;P&gt;VALID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exceptions&lt;/P&gt;&lt;P&gt;ARCHIVE_INFO_NOT_FOUND&lt;/P&gt;&lt;P&gt;INVALID_PRINT_PARAMS&lt;/P&gt;&lt;P&gt;INVALID_ARCHIVE_PARAMS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function Group&lt;/P&gt;&lt;P&gt;SPRI&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2005 04:13:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-print-parameters/m-p/1080115#M97585</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-11T04:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: GET_PRINT_PARAMETERS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-print-parameters/m-p/1080116#M97586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the exporting parameters u have given the archive mode is '1' and you are passing the archiving parameters .&lt;/P&gt;&lt;P&gt;dont pass the archiving parameters your report will get printed as the output is getting archived.&lt;/P&gt;&lt;P&gt;comment archive_mode = 1&lt;/P&gt;&lt;P&gt;and the out_archive_parameters = it_arc_params&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Lavanya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2005 13:56:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-print-parameters/m-p/1080116#M97586</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-11T13:56:31Z</dc:date>
    </item>
  </channel>
</rss>

