Application Development 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: 

Search within all SAP ABAP code for a variable.

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Surman,

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

regards,

Archer

0 Kudos

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

naresh_kabar
Explorer
0 Kudos

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.

0 Kudos

This is a good program.

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

0 Kudos

Hi sakshi,

You can exclude Z* or Y* by excluding pattern

0 Kudos

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

0 Kudos

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).

former_member185613
Contributor
0 Kudos

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