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

Spool not create in background using Submit statement

Former Member
0 Likes
2,259

Hello,

    

                I have created one custom report using SUBMIT statement ( Report name - RKAEP000 ).

                Problem is , When i execute report in background , but spool is not generated.               

               

                   

                When i commented SUBMIT Statement Code , and then  execute report in background , spool is  generated successfully.

                Kindly , Suggest me.

Thanks,

Pratiksha

6 REPLIES 6
Read only

Former Member
0 Likes
1,582

Hi Pratiksha,

Is your spool generation logic in the custom report, after the submit statement?

If yes, are you using submit with the AND RETURN addition?

Thanks,

Sowbhagya

Read only

0 Likes
1,582

Hello ,

                    Check  Below Code ,

                             

                             SUBMIT (REPNAME)
                             USING SELECTION-SET 'S_VARI'
                             WITH P_KOKRS EQ P_KOKRS
                             WITH P_TCODE EQ P_TCODE
                             WITH KOSTL IN S_KOSTL
                             WITH R_BUDAT IN S_BUDAT
                             USING SELECTION-SCREEN 100
                             AND RETURN.

Thanks,

Pratiksha

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,582

Try to force TO SAP-SPOOL spool_options in your SUBMIT AND RETURN statement.

Regards,

Raymond

Read only

0 Likes
1,582

     I also used this Code , but still not getting spool in background.

    

Thanks,

Pratiksha

Read only

0 Likes
1,582
  • In SM37 use option : steps, All spool list (so reading table TBTCO but also TBTC_SPOOLID)
  • Also are you sure of the subscreen nr (did you copy from transaction definition) try remove the 'USING SELECTION-SCREEN' as the background job should use the TCODE and not the dynnr?

Regards,

Raymond

Read only

Sandra_Rossi
Active Contributor
0 Likes
1,582

Look directly at the spool files via transaction SP01, not SM37. I think SAP doesn't retain the relationships between job/spool in the scenario you indicate (SUBMIT). Don't forget TO SAP-SPOOL.