In the source code editor, you have the following options for extracting constants:
Function | Description | Available since SAP NetWeaver 7.3 EHP1 | Available since SAP NetWeaver 7.4 |
---|---|---|---|
Extracting Constants from Literals | Creating a constant with the value of the literal and replacing
all occurrences. Note
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. |
SP11 | SP05 |
Reusing Existing Constants | Replacing a literal with an existing constant. All other occurrences of the same literals remain unchanged. | SP11 | SP05 |
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. | SP11 | SP05 |
Example