Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Problem with spool request generation in Dialog program

Hi,

To give the spool and print functionality in dialog program i have used the function module code like below -

 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 <> space AND sy-subrc = 0.
         SUBMIT (sy-repid)
                USER SY-UNAME TO SAP-SPOOL
                SPOOL   PARAMETERS ls_pri_params
                WITHOUT SPOOL DYNPRO. 

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....

                                                                                
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.                       
-                                                                                

I know that i should not use submit statement for dialog program, but what is the solution for this.

Thanks in advance..

Tags:
Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question