‎2007 Feb 22 6:31 PM
Hi, just a question on grouping of classes in ABAP Objects.
In Java, you can group classes by "package" to avoid
namespace collision, my question, in ABAP Objects, how
do you group classes to avoid namespace collision?
I know that there is package concept in SAP/ABAP but it
is different concept in Java.
Thanks in advanced for your reply.
‎2007 Feb 22 7:02 PM
Hello
Every global class has to be assigned to a package within SAP. However, the package name is not (yet) part of the identification, thus there is <b>no package concept in ABAP</b> like in Java.
Also, method names are unique irrespective of their interface. Thus, an ABAP class cannot have the same method (name) several times.
Regards
Uwe
‎2007 Feb 24 8:39 PM
Hello One and Lonley,
the package concept in ABAP and Java is quite different. In java the package name is part of the development object in ABAP not. So any class pool name is global unique. In combination with the restriction on 30 chars this leads often to somehow cryptic names.
The only way to escape this somehow is the excessive use of local classes. That mean classes defined within main programs. If you are on 7.00 you may check FuGr SAPLSAUNIT_TREE_CTRL_LISTENER for this technique.
Best Regards
klaus