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: 

Find unused class attributes in ATC / SCI

sebastian_wilhelm1
Participant
0 Kudos

Hi experts,

when I'm running the code inspector (SCI) with a variant that checks SLIN, unused fields within a method will be found but no class attributes.

Does anyone know, how to find unused class attributes?

Thanks and regards,

Sebastian

6 REPLIES 6

FredericGirod
Active Contributor
0 Kudos

You should have this check available, I have it when I run ATC through Eclipse (but I cannot check the corresponding class for this check)

sebastian_wilhelm1
Participant
0 Kudos

Hi Frederic!

I don't understand your comment. What check and how can I activate it?

At described above. I testet a lot (in SAP GUI and Eclipse), activated all SLIN checks. But unused Class Attributes won't be found

FredericGirod
Active Contributor
0 Kudos

Don't use Answer to add a comment, Answer is to propose a solution.

So transaction SCII

Activate in the tree, Generation/Syntax check (or something like that) > ...(SLIN)

Check with the green arrow all the check are activated

enter the program, or class, or anything, an run the test.

You should configure a variant, and manage it through transaction ATC, SLIN directly is old school

0 Kudos

Okay. Didn't see the "add a comment" button.

Like I wrote, this is what I did. Created a variant via SCI. Activated SLIN with all checks, etc. I even debugged the class which checks the (unused) fields BUT class attibutes have been filtered out so that it won't be checked if they are used or unused. Within the coding I didn't get a hint, how I can change this behaviour via customizing.

Are you shure, your Code Inspector detects and diesplays not used class attributes?

0 Kudos

I have created a beautiful attribute, not used in my class

I hope you like french word

The check is only inside the class. Meaning, if nobody use it outside, I don't care.

0 Kudos

Hi Frederic,

thanks for the info.

This is a global class? Can you tell me the message class and message code.

The following is the class and code for an unused local class variable