Skip to Content
0
Former Member
Nov 29, 2005 at 04:36 PM

CATCH EXCEPTION DBIF_DSQL2_SQL_ERROR

61 Views

Hello all,

I'm querying an external System via DBLINK.

In some cases this results in a dump (e.g. when there are no rows returned).

So i tried to catch the RUNTIME ERROR because i want to continue processing.

I tried the following code but for some reason it continues dumping.

All suggestions welcome!

Thomas

CATCH SYSTEM-EXCEPTIONS OTHERS = 1.

exec sql.

execute procedure p_getidbyname@ZWINCASH

(IN :mg, IN :'Merchand.', IN :'Y', OUT :mgid )

ENDEXEC.

endcatch.

if sy-subrc = 1.

write:/ 'Da ist was falch gelaufen'.

endif.