Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Search within all SAP ABAP code for a variable.

Former Member
0 Likes
8,849

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?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
5,317

Hi Surman,

To run this CODE_SCANNER ,it will help you find a string from target object. Could be all reports.

regards,

Archer

9 REPLIES 9
Read only

Former Member
0 Likes
5,317

Hi Surman,

When you say variable in ABAP, either it can be local variable which is valid only inside the program/include.. Once u double click on the variable it will take you to the declaration part and you find wherever its been used.

If its a global variable(constant data dictionary field) by clicking on the "Where-used list"

button in the toolbar.

Regards,

Sabarinathan C

Read only

Former Member
0 Likes
5,318

Hi Surman,

To run this CODE_SCANNER ,it will help you find a string from target object. Could be all reports.

regards,

Archer

Read only

0 Likes
5,317

I entered transaction code: CODE_SCANNER and it ran a report : AFX_CODE_SCANNER.

It is indeed a great program.

However, there is one question.

Under Search Criteria: Packages: I give Z*

This is to tell the program: search within all user developed programs which start with Z* or Y*.

How do i search within SAP developed code? Code for which i need access key to modify

Read only

naresh_kabar
Explorer
0 Likes
5,317

Hi Sakshi,

SAP has provided source code scanner program for that "RS_ABAP_SOURCE_SCAN"

go to SE38 and run given program and enter parameter for String searched for and program name if it is customized code than Z* and execute.

It may solve your problem.

Read only

0 Likes
5,317

This is a good program.

How do i find the a string in SAP supplied reports. That don't start with Z* or Y*

Read only

0 Likes
5,317

Hi sakshi,

You can exclude Z* or Y* by excluding pattern

Read only

0 Likes
5,317

Use exclude value options provided in select option. PFA screenshot for your reference.

Read only

dellagustin
Product and Topic Expert
Product and Topic Expert
0 Likes
5,317

I recommend this one instead of CODE_SCANNER, it is more user friendly and supports Regular Expressions, which can be quite handy.

It does not search into TYPE POOLS though (but neither does CODE_SCANNER).

Read only

former_member185613
Contributor
0 Likes
5,317

Hi Sakshi,

Double clicking on the variable name will give you list of places where the variable is used. You can also make use of find option available to find the places of variable usage.

Hope it helps,

~Athreya