09-17-2014 5:02 PM
Hello Experts,
I have a Report which collect some data and send them via Email. Now the email will be sent whatever the data has been found or not.
Could you give me a tipp how to stop the job on the stage after sybrc != 0 when the data hasn't been found?
START-OF-SELECTION.
SELECT vbeln fkart
INTO CORRESPONDING FIELDS OF TABLE ta_rechnung
FROM vbrk
WHERE fkdat IN s_fkdat.
IF sy-subrc <> 0.
ENDIF.
Simple error message doesn't work
BR
Denis
09-17-2014 5:14 PM
09-17-2014 5:06 PM
09-17-2014 5:14 PM
09-17-2014 6:29 PM
Hi,
What do you mean by "stop the job on the stage" and if it's normal SM36 job how do you want it "stopped" - so the status of job is "Canceled" and and execution stopped? Message of type 'E' error does normally do that and one has to investigate what is not "normal" in your case.
cheers
Janis
09-17-2014 6:46 PM
Hi Denis - Use Leave List-Processing.
if sy-subrc ne 0.
MESSAGE 'No data found' TYPE 'I'.
LEAVE LIST-PROCESSING.
endif.
Cheers!!
Raju Shrestha
09-18-2014 7:53 AM
Hi,
is it possible that you just dont want an email when no data found, so your inbox wont get spammed? That would have nothing to do with stopping the job. Sounds like you should just change the programm logic on the "send eMail"-part... and leave the job as it is. Because once the job is stopped, you will have to think about how to start it again.
regards
Stefan Seeburger
09-18-2014 8:44 AM
How did you send the mail
Regards,
Raymond