How to stop a Job when data not found
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?
SELECT vbeln fkart
INTO CORRESPONDING FIELDS OF TABLE ta_rechnung
WHERE fkdat IN s_fkdat.
IF sy-subrc <> 0.
Simple error message doesn't work