<?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 Problem with spool request generation in Dialog program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-spool-request-generation-in-dialog-program/m-p/4542394#M1073025</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;    To give the spool and print functionality in dialog program i have used the function module code like below - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; call function 'GET_PRINT_PARAMETERS'
      exporting
           mode                   = ' '
           in_parameters          = ls_pri_params
      importing
           out_parameters         = ls_pri_params
           valid                  = lv_valid
      exceptions
           archive_info_not_found = 1
           invalid_print_params   = 2
           invalid_archive_params = 3
           others                 = 4.
   IF lv_valid &amp;lt;&amp;gt; space AND sy-subrc = 0.
         SUBMIT (sy-repid)
                USER SY-UNAME TO SAP-SPOOL
                SPOOL   PARAMETERS ls_pri_params
                WITHOUT SPOOL DYNPRO. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the problem is, if it is list then we can easily get the print function, since i am using the above code in the dialog program screen 9000, program is giving dump like....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;                                                                                
Incorrect program type with SUBMIT.                                                                                
What happened?                                                                                
The current ABAP/4 program "SAPMYXXXXXX" had to be terminated because               
one of the statements could not be executed.                                                                                
This is probably due to an error in the ABAP/4 program.                               
You attempted to start a program not intended for this purpose.                       
-                                                                                
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know that i should not use submit statement for dialog program, but what is the solution for this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Oct 2008 16:03:11 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-10-01T16:03:11Z</dc:date>
    <item>
      <title>Problem with spool request generation in Dialog program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-spool-request-generation-in-dialog-program/m-p/4542394#M1073025</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;    To give the spool and print functionality in dialog program i have used the function module code like below - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; call function 'GET_PRINT_PARAMETERS'
      exporting
           mode                   = ' '
           in_parameters          = ls_pri_params
      importing
           out_parameters         = ls_pri_params
           valid                  = lv_valid
      exceptions
           archive_info_not_found = 1
           invalid_print_params   = 2
           invalid_archive_params = 3
           others                 = 4.
   IF lv_valid &amp;lt;&amp;gt; space AND sy-subrc = 0.
         SUBMIT (sy-repid)
                USER SY-UNAME TO SAP-SPOOL
                SPOOL   PARAMETERS ls_pri_params
                WITHOUT SPOOL DYNPRO. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the problem is, if it is list then we can easily get the print function, since i am using the above code in the dialog program screen 9000, program is giving dump like....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;                                                                                
Incorrect program type with SUBMIT.                                                                                
What happened?                                                                                
The current ABAP/4 program "SAPMYXXXXXX" had to be terminated because               
one of the statements could not be executed.                                                                                
This is probably due to an error in the ABAP/4 program.                               
You attempted to start a program not intended for this purpose.                       
-                                                                                
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know that i should not use submit statement for dialog program, but what is the solution for this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2008 16:03:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-spool-request-generation-in-dialog-program/m-p/4542394#M1073025</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-01T16:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with spool request generation in Dialog program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-spool-request-generation-in-dialog-program/m-p/4542395#M1073026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you check the F1 help of SUBMIT. if not give a try.Submit cannot be used on Module pool programs. it is used for Report(executable ) programs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2008 16:07:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-spool-request-generation-in-dialog-program/m-p/4542395#M1073026</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-01T16:07:48Z</dc:date>
    </item>
  </channel>
</rss>

