In the source code editor, you can substitute members of an ABAP class in order to perform any of the following functions:
Function | Description | Available since SAP NetWeaver 7.3 EHP1 | Available since SAP NetWeaver 7.4 |
---|---|---|---|
Changing Visibility of Members | Changing the visibility of a member by moving it into the public, protected, or private section. | SP06 | SP02 |
Converting Locals to Class Members | Converting a local constant, local variable, or local type to a class member such as a member constant, attribute, or member type of the current class. | SP11 | SP05 |
Pull-up Members to Superclass | Removing member definitions from a subclass and adding them to the superclass. | - | SP08 |
Pull-up Members to Interface | Removing member definitions and adding them to the implemented interface. Additionally, aliases are declared to avoid invalidation of existing usages. | - | SP08 |
In SAP NetWeaver 7.4, you can only extract literals into constants as a string type. So, if you extract constants, a warning message that can be ignored is displayed. The reason for this is that, if you assign a character constant, it is not clear which exact type should be used.
Example