01-05-2015 11:23 AM
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
01-05-2015 11:50 AM
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.
01-05-2015 12:12 PM
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.
01-05-2015 12:46 PM
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"
01-05-2015 1:05 PM
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.
01-05-2015 1:14 PM
Question posted already Dec 21, 2014, and rejected. Thread locked.