SAP ALIASES ABAP Statements
Get Example source ABAP code based on a different SAP table
Standard SAP Help for ALIASES
ALIASES
• ALIASES ABAP Statement
• FOR ALIASES
ABAP Syntax
What does it do? This statement in the declaration section of a class or interface declares the alias name
An alias name belongs to the components of the class and the interface. It shares the namespace with the other components and is inh erited by subclasses. In classes, an alias name can be declared in every
Latest notes:Within a context, such as a class declaration or method, only one label should be used to access components. The syntax check issues a warning, if you use both alias name and the complete label
Example ABAP Coding
In the interfaces
METHODS meth.
ENDINTERFACE.
INTERFACE i2.
INTERFACES i1.
ALIASES m1 FOR i1~meth.
METHODS meth.
ENDINTERFACE.
INTERFACE i3.
INTERFACES i2.
ALIASES: m1 FOR i2~m1,
m2 FOR i2~meth.
METHODS meth.
ENDINTERFACE.
CLASS c1 DEFINITION.
PUBLIC SECTION.
INTERFACES i3.
ALIASES: m1 FOR i3~m1,
m2 FOR i3~m2,
m3 FOR i3~meth.
ENDCLASS.
CLASS c1 IMPLEMENTATION.
METHOD i1~meth.
... m2( ) ...
ENDMETHOD.
METHOD i2~meth.
... m3( ) ...
ENDMETHOD.
METHOD i3~meth.
... m1( ) ....
ENDMETHOD.
ENDCLASS.
Return to menu