Check sy-subrc
check_subrc
Pragma: ##SUBRC_OK
Pseudo comment: EC CI_SUBRC
Description
Check sy-subrc
Extended Information
Pseudo comment "#EC CI_SUBRC can be added to suppress findings
If sy-dbcnt is checked after database statements, it is considered okay.
"SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
If IS ASSIGNED is checked after assigning, it is considered okay.
FIND statement with MATCH COUNT is considered okay if subrc is not checked
CALL FUNCTION and method calls are checked if they have an EXCEPTIONS addition that maps an exception to a value other than 0,
including CALL FUNCTION DESTINATION and STARTING NEW TASK. Not checked: calls without EXCEPTIONS, calls where every exception
is mapped to 0, EXCEPTION-TABLE, CALL FUNCTION IN UPDATE TASK and IN BACKGROUND.
For CALL FUNCTION the pragma ##FM_SUBRC_OK is also accepted.
A call of a method with SUBRC in its name, like check_subrc( ), is considered a check.
After ELSE, ELSEIF, WHEN, CATCH and CLEANUP the check continues after the end of the block, as these branches are not run
after the statement