Beruflich Dokumente
Kultur Dokumente
ENDIF. Examples Keyword Dependency In the first example, the runtime error CONVT_NO_NUMBER is caught during conversion with MOVE. In the second example, the runtime error cannot be caught, since the keyword SELECT has no primary conversion function. In the third example, the conversion takes place in an auxiliary field (MOVE 'abc' TO int.) andn the SELECT statement uses only operands with the same type. This enables the system to catch the runtime error. DATA I TYPE I. *** CONVERSION_ERRORS contains CONVT_NO_NUMBER *** CATCH SYSTEM-EXCEPTIONS CONVERSION_ERRORS = 1. MOVE 'abc' TO I. " <- Error: CONVT_NO_NUMBER ENDCATCH. IF SY-SUBRC = 1. ... ENDIF. ... TABLES SFLIGHT. CATCH SYSTEM-EXCEPTIONS CONVERSION_ERRORS = 1. SELECT * FROM SFLIGHT WHERE SEATSMAX = 'abc'. " <- Error: CONVT_NO_NUMBER ... ENDSELECT. ENDCATCH. ... TABLES SFLIGHT. DATA int LIKE SFLIGHT-SEATSMAX. CATCH SYSTEM-EXCEPTIONS CONVERSION_ERRORS = 1. MOVE 'abc' TO int. " <- Error: CONVT_NO_NUMBER SELECT * FROM SFLIGHT WHERE SEATSMAX = int. ... ENDSELECT. ENDCATCH. ... Note Using Runtime Error ID and ERROR Class You are recommended only to use ERROR classes in the CATCH statement wherever possible. Assignment of keywords to ERROR classes contains a simple description of which errors are covered by a particular ERROR class. You should only use the runtime error ID if the error situation can be very precisely defined. For more information about when runtime errors occur, see alphabetical list of all catchable runtime errors. Note Performance: The CATCH...ENDCATCH statements require about 3-4 msn (standardized microseconds) of runtime, if no runtime error occurs. If the statements then have to catch a runtime error, they may require more runtime, depending on the type of the runtime error. In the least serious case, this will be another 3-4 msn. In more serious cases, it can be up to 20 msn. For most cases, the increased runtime will be around 5-10 msn.
converted by Web2PDFConvert.com