... SAP function modules provides proper checks inside them, but in many cases developer should take care about them inside the coding. The code I will provide below will scan program for AUTHORITY-CHECK statement ...
...
scanabap-source mt_src
tokens into mt_tokens
statements into mt_statements
keywords from mt_keywords
levels into mt_levels
with includes
with list tokenization ...