Skip to Content
0
Former Member
Sep 17, 2014 at 04:02 PM

How to stop a Job when data not found

162 Views

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