RFC calls must handle SYSTEM_FAILURE and COMMUNICATION_FAILURE
ErrorSecurity & Robustness#EC RFC_ERRRemote Enabled
Overview
RFC calls must handle system failures.
ATC Finding Message:
RFC call must handle SYSTEM_FAILURE and COMMUNICATION_FAILURE
Rationale
A remote function call can fail because the target system is unavailable or the communication layer breaks, independently of the function logic. Without handlers for SYSTEM_FAILURE and COMMUNICATION_FAILURE, these failures become unhandled dumps or silent errors. Always handle both, plus OTHERS, and evaluate the response.
Non-Compliant
abap
CALL FUNCTION 'Z_RFC'
DESTINATION lv_rfc.Compliant
abap
CALL FUNCTION 'Z_RFC'
DESTINATION lv_rfc
EXCEPTIONS
system_failure = 1 MESSAGE lv_message
communication_failure = 2 MESSAGE lv_message
OTHERS = 3.Suppression
To suppress findings for this rule, append the pseudo-comment to the statement:
abap
" Standard pseudo-comment:
... "#EC RFC_ERR
" SAP CI_ prefix format:
... "#EC CI_RFC_ERRTechnical Details
- Native ATC Class:
ZCL_SKYLINT_NO_RFC_ERR - Implementation File: zcl_skylint_no_rfc_err.clas.abap