Application Development and Automation 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: 
Read only

Can't get spool ID after submitting program

Former Member
0 Likes
3,214

Hi,

I need to submit program to spool and then to send result by mail.

Here is my code:

SUBMIT rprccc_read_kr1025 TO SAP-SPOOL WITHOUT SPOOL DYNPRO   USING SELECTION-SET 'CUS&STANDARD'

     WITH   firmennr  = is_files-filename+14(6)

     WITH   file_inl  = abap_true

     WITH   fil_onl   = abap_true

     WITH   fil_fnl   = abap_true

     WITH   file_nin  = lv_file_nin

     WITH   fil_nout  = lv_file_nout

     WITH   fil_nf    = lv_file_nf

     WITH   rb_fehl   = abap_false

     WITH   rb_all    = abap_true

     IMMEDIATELY 'X'

     AND RETURN.

After I run this code no record being created in table TSP01 so I can't get spool id.

If I am running same code without AND RETURN the record being created but I can't return back to the program.

So what's the problem?


1 ACCEPTED SOLUTION
4 REPLIES 4
Read only

0 Likes
2,557

Thanks Basar Ozgur Kahraman,

this link solved my problem:

http://abapkod.wordpress.com/2010/07/21/submit-report-and-spool-to-mail/

Read only

Former Member
0 Likes
2,557

Hello Dan,

I think you will get spool number by Using Get Parameter.

Regards,

Deepti

Read only

Venkat_Sesha
Product and Topic Expert
Product and Topic Expert
0 Likes
2,557

check this syntax.

      SUBMIT (sy-cprog)    WITH SELECTION-TABLE seltab

                           TO SAP-SPOOL

        ... IMMEDIATELY flag

        ... KEEP IN SPOOL flag

                           WITHOUT SPOOL DYNPRO

                           AND RETURN.

Hope this solves your question.