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: 

how can we fine and delete unused variables?

Former Member
0 Kudos

Hi , This is Kumar,

I have been working for some Upgrade project. My manager asked me the way to know unused variables which are already declared in the program . But i don't know any special way to find them.

Normally for Internal tables we are using CLEAR, REFRESH AND FREE.

So,

How can we delete unused variables which are already declared in program?

If anybody have any idea , kindly let me know.

Thanks & Regards,

P.N.Kumar.

5 REPLIES 5

Former Member
0 Kudos

Hi,

Try extended program check. This will give you a list.

Gr.

John

Former Member
0 Kudos

hi kumar,

with transaction SLIN you can find variables declared an not used...

regards, sebastian

Former Member
0 Kudos

Hi Kumar,

Go to SE38

Go to Menubar ---> Program ---> Check -


> Extended Program Check / Code Inspector.

As the previous SDN Member said, we can also use SLIN.

All the above will list out the unused variables / Errors/Warnings pertaining to a program.

JerryWang
Advisor
Advisor
0 Kudos

Hello friend,

in SE24,SE38 and SE80 there is a menu called "Refactoring" which can enable you to delete unused variable defined in your source code automatically.

Of course it is not the only functionality of this poweful tool. Please read the article below:

http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/2054857b-1b4d-2c10-f7a5-d283a11f6789

I am sure you can benefit a lot from it not only know how to delete unused variable

Best Regards,

Jerry

0 Kudos

hi,

Use Transaction Code "SLIN" AND give program name

it can be done in quality 700

You will find all warnings and errors and will also show you unused variables

Regards

Deepak.