You can use the SAP Code Inspections to create a static check of the source code. But if you combine these static checks with SQL information from the productive information you get the full picture.

How to activate the SQL Monitor: SAP Help Documentation

Use transaction SWLT to collect information from both sources.