The code contains too many unchecked returns of functions calls
Why you should care
Missing return code checks after an Open SQL statement can result in unpredictable behavior and untraceable execution errors. This is why it is extremely important to report and handle errors as soon as they occur.
![5362](https://doc.casthighlight.com/wp-content/uploads/2018/02/map-shadow.png)
CAST Recommendations
Check the system field SY-SUBRC after SQL commands, internal table commands and file-handling commands.
References
Enhancing the Quality of ABAP Development, Meijs-Krouwels-Heulmans-Sommen, SAP Press ISBN 1-59229-030-2
How we detect
This Code Insight counts one occurrence each time an SQL statement is found without return code checks.
Example:
select date_e into zdate_e
from zkopcor
where date_e lt p_run
and p_doc eq ‘TT’.
<statements>
![5362](https://doc.casthighlight.com/wp-content/uploads/2018/02/map-shadow.png)
About CAST and Highlight’s Code Insights
Over the last 25 years, CAST has leveraged unique knowledge on software quality measurement by analyzing thousands of applications and billions of lines of code. Based on this experience and community standards on programming best practices, Highlight implements hundreds of code insights across 15+ technologies to calculate health factors of a software.