Get Example source ABAP code based on a different SAP table
ID ALIASES • ALIASES ABAP Statement • FOR ALIASES
ALIASES> Short Reference >
ABAP_SYNTAX ALIASES alias FOR intf~comp.>
What does it do? In the declaration part of a class or interface, this statement declares an alias name alias> for a component comp> of the interface intf>. The naming conventions> apply to the name alias>. The interface intf> must be implemented in the same class or included in the same interface. The alias name can be used anywhere, where it is visible, instead of intf~comp>, to access the interface component comp>. An alias name is a component of the class and the interface. It is in the same namespace as the other components and is inherited by subclasses. In classes, an alias name can be declared in every visibility section>.
Latest notes:
Within a context, such as a class declaration or method, only one name should be used to access components. The syntax check issues a warning if both the alias name and the full name intf~meth> are used together.
When implementing interface methods in the implementation part of classes using METHOD> and when re-defining> methods using METHODS ... REDEFINITION>, the alias name can also be used. NON_V5_HINTS ABAP_HINT_END
ABAP_EXAMPLE_VX5 In the interfaces i2>, i3> and the class c1>, aliases are declared for the methods of the included or implemented interfaces. In the implementation part of the class, the interface methods in the METHODS>> statements are implemented using the interface component selector. However, the aliases of the classes could also be used here. ABEXA 00004 ABAP_EXAMPLE_END