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: 

Background job getting cancelled when using submit statement

hemasudhad
Discoverer
0 Kudos

Hi All,

I have a requirement where i need to extract output ST22 tcode into an excel on daily basis via a custom report.

For this i have created custom report in which i have used “SUBMIT” statement, and i am running this report daily in background to get the list of dumps for that day into an excel.

But the problem is if we have some dumps for that particular day, then background job is getting finished and output is generated.

If there are no dumps for particular day then back ground job is getting cancelled.

Please assist

5 REPLIES 5

abdul_hafeez4
Participant
0 Kudos

Dear,

You can use "Submit and return " statement. As in your case, if there is no record is found, it must not go for generating excel sheet. Put the check if no record found dont go for excel generating.

Hope these two steps will resolve your query.

0 Kudos

Can you please tell me which check i need to use.

I have tried to check sy-subrc value after submit statement. Sy-subrc will be always 0 as submit is working fine.

I also had put a check on number of entries fetched after executing Submit statement, if there are some dumps then internal table will have some values, else internal table will be empty. i have put a check on internal table was well but it didn't work out.

0 Kudos


you can use control statement like "if statement" as a check.

if there is no record in internal table don't even need to submit.

propt the user with message "no record found/ no dump found"

0 Kudos

Hi Abdul,

Thanks for your reply.

But to put a check on internal table i should first execute submit statement, output which has come using submit will be stored in the internal table.

matt
Active Contributor
0 Kudos

Question posted already Dec 21, 2014, and rejected. Thread locked.