This guide represents part 3 of 3 for the topic ABAP Object Oriented with Model View Controller (MVC).
- Part 1: Understanding ABAP OO with MVC design using local classes.
- Part 2: Expand local classes with functionality to better illustrate OO and MVC approach.
- Part 3: Convert local classes into global classes.
In part 2, we have added functionality to the program skeleton to have screen validation, retrieve data, display in ALV and handle user command. Now, we shall convert local classes to global classes and with added functionality to ALV using custom ALV utility class. However, there are certain limitation with selection screen where we are unable to achieve 100% object-oriented approach. This will be discussed later in this guide.
For ABAP, we can’t define screens in class unlike Java, thus syntax for selection screen for e.g.
CALL SCREEN would lead to error in global classes. It works for local classes because SAP do not strictly abide to object-oriented concept for local classes.
For consistency, the conversion to global classes will also focus on the main program
zlocal_oo first, followed by the class definitions and implementations.
The selection screen has been enhanced to include more options for different ALV layouts.
This section contains premium content accessible by paid members only. Please click here to join our membership to support us.
For premium members, please login below to access this content.