Search within all SAP ABAP code for a variable.

gram77
gram77 used Ask the Experts™
on
I used a variable called - myvar.
I am uncertain where all i have used it during the ABAP development.
 
How can i search all ABAP code ever written in SAP for this variable?
In other words, how can i search SAP ABAP code for a variable, key word etc..

like in Oracle we had all_source, dba_source views to search pl/sql code for any string is there something similar in SAP ABAP?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Onn LightSAP Technical Consultant

Commented:
Hi Gram77

From tcode SE80 or SE38You can use the Find(Ctrl +F) from the main toolbar SE80---1.png to search for any string Find Dialog Window within multiple programs Search-Range---1.png.

The Search Result Search-Result.png
Thanks and regards
onn

Author

Commented:
This partially meets my requirements.

As you have posted in your comment, you are manually choosing the programs for SAP to find from - Z100, Z200

I do not have the programs to find the string from.

I want SAP to give me a list of all programs that contains the string.

Author

Commented:
Why does SAP ask me to choose from a program list. If i am searching for a string i myself don't know in which all programs i can find the string in. That's what the program is supposed to find.

also there are other prebuilt programs that do the same:
RPR_ABAP_SOURCE_SCAN
RSRSCAN1
CODE_SCANNER

each one of these reports as for a parameter where i am supposed to provide program names where i think i may find the string. how rediculuos
CompTIA Security+

Learn the essential functions of CompTIA Security+, which establishes the core knowledge required of any cybersecurity role and leads professionals into intermediate-level cybersecurity jobs.

Author

Commented:
Also another way is
TCode: CODE_SCANNER
Run a procedure (TCode:SE38): RS_ABAP_SOURCE_SCAN.

My only concern is: The parameter form asks me for Program Name:

Values i provide is Z* or Y*. This searches for user developed programs starting with Z or Y.

How do i search within SAP provided programs, which don't start with Z or Y
SAP Technical Consultant
Commented:
Hi gram77

The Program Name Parameters in CODE_SCANNER and (TCode:SE38): RS_ABAP_SOURCE_SCAN are optional or accepts * for all.  

But its recommended that you somehow limit your search.

Confirmation prompt for CODE_SCANNER with * for Package name
With CODE_SCANNER if you give * and execute you get the above prompt.  18590 Packages are a lot of packages.

Its better if you can limit your search result, if you want to exclude Z* and Y* you can do it using the Multiple Selection (Exclusion) options.

Excluding Values in Multiple Selection
 
If you run with *

RS_ABAP_SOURCE_SCAN running
Your search will most likely Time Out, mine has already done so have scheduled it on background, will see if that gives any results.

Thanks and Regards
onn

Author

Commented:
How did you come up with Exclusion Screen. Where you selected programs to be excluded from the search list.

CODE_SCANNER
RS_ABAP_SOURCE_SCAN

don't have this screen
Onn LightSAP Technical Consultant
Commented:
Hi gram77

Its this button Select-Option-Buton1.png  right next to each parameterSelect-Option-Buton.png
thanks and regards
onn

Author

Commented:
Excellent

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial