SAP DEAD CODE - Guide
Get Example source ABAP code based on a different SAP table
GUIDELINE 4.25
Dead Code
ABAP_BACKGROUND
Dead code is program parts that are never executed because they are no longer required or were never actually required at any time. This code can accumulate during the development (rejected prototypes) or maintenance (changeover to new code without deleting the old code) of programs.
ABAP_RULE
Completely remove any unused or inaccessible program parts from live programs.
ABAP_DETAILS
Although dead code does not affect the executed program parts directly, it still has a negative impact on the product. Program parts that cannot be accessed during program execution do not provide any benefit. Instead they cause increased costs in the course of a program#s lifecycle because they must be identified as unused for maintenance and further development purposes. The worst case scenario is that if these program parts are not immediately recognized as unused, they will be reused or modified during further developments or
Dead code also interferes with the aim of maximum
Note
However, these static checks can never be complete because not every use of a program part has to be statically recognizable. Therefore, the Coverage Analyzer is another important tool for isolating potential dead code.