ABAP

ABAP : Error bad handling

Classification

PCI DSS 4.0

Overview

The application does not correctly handle errors or does not handle at all.

Any exception, if it can affect the logic of the program, must be handled.

In ABAP, there are two main ways to handle exceptions: classical and based on OOP. The way based on OOP is preferred.

  • To implement error handling when calling methods and procedures, you must use the way based on OOP. In this case, the RAISE EXCEPTION statements are used to call exceptions and the CATCH - TRY statements to handle exceptions.
  • To implement error handling when calling RFM (remote function modules), you must use the classic error handling method, because the method based on OOP is not supported. In the classical exception handling mode, the sy-subrc field will be filled with the number under which the exception was indicated when the function module was called in EXCEPTIONS. Handling is carried out using the constructions RAISE or MESSAGE RAISING. If an exception that is not processed when the function module is called occurs, and the OTHERS keyword is missed, the RAISE_EXCEPTION run-time error occurs.

The system field sy-subrc is undefined after the statement CALL FUNCTION ... IN UPDATE TASK is executed.

LOW

DerScanner Severity Score

Check your ABAP code for this vulnerability, free

Request a free pilot of DerScanner. We give you access and help with the first scan. It works in the cloud and on-premise.

Try it on your code, free

By submitting this form, I acknowledge that DerScanner may process my personal data I provided above for purposes explained above. More details about the processing.

How DerScanner analyses ABAP code