Dear community, I frequently work with various ABAP developers. I’ve noticed that many developers perceive a large number of classes as pure chaos in the development environment. They simply lose track and have trouble identifying the class they want to work on.
I can understand that. Especially when all classes are assigned to a single package. In my opinion, that’s precisely where the problem lies: a lack of order which allows a distinction. The absence of order doesn’t automatically mean chaos, but it quickly leads to chaos. Then you quickly lose track.
What can you do? The antidote are well defined and well structured packages, because they were created for order, to bundle development objects that belong together in a 30-character, hopefully informative name. Note: Z_MM_KON and ZSD_KA are examples of less informative names.
Packages are like labeled containers that contain development objects such as classes. These containers can, in turn, be structured, i.e., they can be divided into sub-packages. Packages can contain other packages. This option should be used extensively.
This is how you navigate through a package structure in Eclipse to the classes, interfaces, and many other development objects that together represent a specific business or technical aspect.
In Eclipse, you can also use a shortcut: the “Favorite Packages” in the Project Explorer. This lets you reach your desired development object as quickly as Mario in the Warp Zone once you’ve built up your favorites.
Packages are now interesting for another reason. You set the ABAP language version for the package. This allows you to specify the permitted content of the respective package. In this context, the keyword “ABAP for Cloud Development” is interesting.
So much for “not losing track of your classes in Eclipse (ADT)”. Incidentally, in my opinion, it’s rare to have too many classes. Software development is largely about modularization and principles like “Separation of concerns“. These alone automatically lead to many classes in an object-oriented language like ABAP.
So don’t lose track and happy packaging
Michael