Global versus local classes
In ABAP, we can create classes in two ways: locally or globally. The main differences are that local classes can be used only in the program in which the class is created, while a global class can be used in every program or function module. Also, the ways in which these classes are created are different. In a local class, we need to create a definition and implementation of the class in the program, and, in a global class, the definition and implementation are created in the class builder.
We create global classes more often than local classes because it's possible to reuse them. If we want to use a local class in a different program, we need to create the same local class in that program, which is not necessary ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access