Remove dead code and unused variables easily


So before moving the code to quality or production, one has to make sure its clean and no dead code/ unused variables are present. One can manually search for those or one can somewhat automate the process using SLIN
SLIN : ABAP program extended syntax check
SLIN : ABAP program extended syntax check

Run transaction SLIN for your code and select all checks.

In the warning lists there will be report of unused variables. Double click on field attributes warnings and remove each dead code, :)

Dead code report
Dead code report