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

Eclipse - Check ABAP Code in only one program/class/interface/include

FredericGirod
Active Contributor
0 Likes
4,428

Ola,

There is something, it's really boring for me in Eclipse.

The situation: I have several windows open, with on each window a class. All these class are more or less linked each other. I am adapting the code to go in a full Clean Code (Yes! I do it ! 😉 ).

I have some errors due to object is inactive, so I would like to activate object one by one, to remove these errors. But I am not able to find only the error-code relative to a particular class. So I have to check manually the whole code, to find red flag.

I could also check the error log, but I have indirect errors, due to the inactive class.

The only stupid way I have find, is to go in SAPGui, and force the Activation of the whole code. And after come back in Eclipse and check the code again.

How do you manage this ?

Do you know if there is a way to control the code in only one object ?

1 ACCEPTED SOLUTION
Read only

schneidermic0
Product and Topic Expert
Product and Topic Expert
3,911

I would expect that the syntax check in Eclipse considers all your inactive versions as long as you saved dependent objects. Activation is not necessary.

"Dirty" (=not saved) versions are only checked in the active editor. Inactive versions of other developers might not be considered.

Saving an object won't execute the syntax check for all editors.Therefore, you might have to press "Check ABAP Development Object" (Ctrl + F2) in the editor as soon as you have save the dependent object.

If you want to see only errors and warnings in Problems view for the selected editors, you might want to change the setting in Problems view to "Show > Errors/Warnings on Selection":

Maybe, this information helps

10 REPLIES 10
Read only

matt
Active Contributor
0 Likes
3,911

I've been in the situation, but not found it problematic - even when I've got 10 or more objects open. And yes, I've occasionally gone to SAPGui to force activation to resolve it.

Sorry - it just doesn't bother me and I can't think of an alternative resolution!

Read only

FredericGirod
Active Contributor
0 Likes
3,911

Thank you for you support matthew.billingham 😉

The problem for me, my project impact user-exit of Sales Order, so each time I play with this, I have several colleagues wonder why there is a lot of dumps 😉

Read only

Sandra_Rossi
Active Contributor
0 Likes
3,911

I'm not sure to understand. You can activate all the changed objects at the same time in Eclipse. Can you share one real case?

Read only

matt
Active Contributor
0 Likes
3,911

If one of the changed objects has syntax errors, you can't activate them all from Eclipse. Since some of the errors might be, e.g. due to a new method in one of the inactive (but otherwise) correct classes, then that'll come up as method not known in a consuming class.

You don't know which of the errors in the problem tab are "real" errors.

When you activate all from SAPGui, you immediately know which object has the syntax error.

As for dumping in Dev - well, it goes with the territory! Tough on the others.

Read only

FredericGirod
Active Contributor
0 Likes
3,911

It is exactly what matthew.billingham describe. When you add a method, or put this method in a new class, the other using class does not know until you activate it. But, maybe you have error in the new class/method ...

Read only

Sandra_Rossi
Active Contributor
0 Likes
3,911

Okay.

But it happens only if you close the tabs of the ABAP code you have changed. I usually keep all my tabs opened and I activate all of them at the same time. I usually don't leave them deactivated a long time. Don't close the tabs which contain deactivated code. Try to activate all of them as soon as possible.

Of course sometimes, there are exceptions, and you have to use SAP GUI, but it's quite rare, no?

Read only

FredericGirod
Active Contributor
3,911

sandra.rossi I think we still doesn't understand each other

All the code is opened & visible. I don't want to activate the whole code, I just want to activate one class. But I don't know if this specific class has an error or not. Because Eclipse merge all the errors of all the window opened in one specific place.

I am used to extract part of the class to another shorted class. To do this, I copy the code, I change the dependency to other class. But at a moment there are a lot of errors due to the new class is not active.

What I was searching for, is to identify only the error of one object, or to have error check on ALL the temporary versions.

Because here also Eclipse is not logical. It checks the temporary code of Class_1 with the active version of the Class_2. And check the temporary code of Class_2 with active version of Class_1.

Read only

schneidermic0
Product and Topic Expert
Product and Topic Expert
3,911

I am also not 100% sure whether I understand your question.

I would expect that the syntax check in Eclipse considers all your inactive versions as long as you saved dependent objects. Activation is not necessary.

"Dirty" (=not saved) versions are only checked in the active editor. Inactive versions of other developers might not be considered.

Saving an object won't execute the syntax check for all editors.Therefore, you might have to press "Check ABAP Development Object" (Ctrl + F2) in the editor as soon as you have save the dependent object.

If you want to see only errors and warnings in Problems view for the selected editors, you might want to change the setting in Problems view to "Show > Errors/Warnings on Selection":

Maybe, this information helps.

Read only

FredericGirod
Active Contributor
3,911

michael.schneider this is exactly my request !!

thanks for the answer (you should convert it to answer & we will be able to close the question)

Best regards

Fred

Read only

schneidermic0
Product and Topic Expert
Product and Topic Expert
3,912

I would expect that the syntax check in Eclipse considers all your inactive versions as long as you saved dependent objects. Activation is not necessary.

"Dirty" (=not saved) versions are only checked in the active editor. Inactive versions of other developers might not be considered.

Saving an object won't execute the syntax check for all editors.Therefore, you might have to press "Check ABAP Development Object" (Ctrl + F2) in the editor as soon as you have save the dependent object.

If you want to see only errors and warnings in Problems view for the selected editors, you might want to change the setting in Problems view to "Show > Errors/Warnings on Selection":

Maybe, this information helps