‎2015 Jan 16 8:25 AM
Hello,
in my program there are serveral internal classes. Each class has its own include file. Code completion seems not working for internal classes in other include files.
example:
lcl_class1 in includec01 (first included)
class-methods static1_1
methods method1_1
lcl_class2 in includec02 (second included)
class-methods static1_1
methods method1_1
problem:
In Functiongroups all working fine.
Best Regards
Markus Bauernschmitt
----------------
Und da hier eh die meisten deutschsprachig sind und mein Englisch grausam ist, nachfolgend die Erklärung nochmal auf deutsch.... 😉
In meinen Programmen findet die Codevervollständigung keine interne Klassen aus vorangegangenen include Dateien. Dadurch werden weder die Klassen selbst noch die statischen Methoden angezeigt. Gebe ich eine statische Methode ein und möchte die Hilfe anzeigen (F2) erscheint die Fehlermeldung "Codeinformationen sind nicht verfügbar".
Dieses Problem tritt nicht auf, falls die Deklaration einer Variablen in der gleichen Include Datei erfolgt.
Es sind nur anscheinend nur Programme betroffen. Bei Funktionsgruppen (getestet am Beispiel "ldemo_cr_car_rental_screen") trat der Fehler nicht auf.
‎2015 Jan 16 10:47 AM
Hi Markus,
I think the local classes are for small programs ("quick and dirty").
If your solution is so complex, that you feel it must be in separate files, why don't you create global classes?
Regards,
Dominik
*********************
Und damit Du mich auch gut verstehst
Ich glaube, lokale Klassen sind eher für kleine Programme gedacht.
Wenn es aber so komplex wird, dass Du meinst es in verschiedene Includes aufteilen zu müssen, warum erstellst Du keine globalen Klassen?
‎2015 Jan 16 11:26 AM
Hi Dominik,
thank you for your answer. The internal classes are already simple and lightweight. In my understanding of OO I keep classes private as possible and so I create this specific "one program helper classes" in the smallest reasonable scope.
However, this is a architektur decission. But the pivotal question is: Why working this kind of code completion in function groups but not in programs.
Some additional information.
- Code completion working in "START-OF-SELECTION."
- In Functiongroup includes (Testcase lcl_class1 show as public type and lcl_class2 show as local public class.
Best regards
Markus
‎2015 Jan 16 11:35 AM
Hi Markus,
I also had this problem when extending one of these old programs with many includes.
And I thought about the reason, why SAP did not support it.
And then I thought, that maybe SAP does not want us to create programs with includes but to program with global classes.
But maybe one of the SAP ADT team can enlight us here
Best regards,
Dominik
‎2015 Jan 19 8:56 AM
Hi Markus,
I just tried to reconstruct your scenario and everything works fine for me: Eclipse Luna, current ADT plugins (fetched from update-site) and backend is on 7.40 SP05 release.
The syntax check is working and the code completion works in all includes and the main program.
What release do you use?
Thank you & best regards
Martin
‎2015 Jan 19 9:19 AM
Hi Martin,
Luna Service Release 1a (4.4.1)
ABAP Development Tools for SAP NetWeaver Version: 2.36.3
SAP Backend: NW 7.40 SP06
---- edit ---
Perhaps the problem is adt detect this class as "open type" instead of "local public class". A screenshot is attached.
Best regards
Markus
‎2015 Jan 19 5:16 PM
‎2015 Jan 21 3:50 PM
Hi,
just a quick update. I spoke with one of the main developers of the ABAP code completion. He will shine some light into this issue asap.
cheers
Thomas