How to check whether a particular string is used in any of the ABAP program?
Use t-code CODE_SCANNER or program AFX_CODE_SCANNER to scan the ABAP source code.
Suppose you want to search all the programs where the user name is hardcoded, then go to transaction code CODE_SCANNER.
Enter the packages that you want to scan for the ABAP programs and string that you want to search and press Execute. In this case I will search all the programs in all the Z packages where user name is hardcoded (i.e. IF sy-uname = ).
Popup will display the number of packages that it would scan. Click on Yes.
All the matching entries will be displayed as ALV list. The output contains the actual line, program name and line number.
Actually the first line in the above output is a comment. If you don’t want comments in the output, just select “Ignore comment lines” checkbox in the selection screen.
Also check the other options given in the selection screen of the program.
Good Post, Made Lot of time saved.