Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with spool request generation in Dialog program

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

former_member188685
Active Contributor
0 Kudos

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.

1 REPLY 1

former_member188685
Active Contributor
0 Kudos

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.