Ansicht
Dokumentation
ABENINTERFACE_COMPONENT - INTERFACE COMPONENT
Addresses (Business Address Services) General Material DataThis documentation is copyright by SAP AG.
INTERFACE, components
The following declaration statements are possible in interfaces for components:
- TYPES, DATA, CLASS-DATA, and CONSTANTS for data types and data objects
- METHODS, CLASS-METHODS, EVENTS, and CLASS-EVENTS for methods and events
- INTERFACES for the inclusion of component interfaces and ALIASES for alias names for their components
The only interface components that can be addressed without implementing the interface in classes are data types and constants. These can be addressed using the name of the interface and the class component selector (=>).
Notes
- All components of an interfaces are in one namespace. Within an interface, the name of a component must be unique regardless of its type (data type, attribute, method, event, or alias name). The components of an included interface are identified by the prefix intf~ (name of the interface with interface component selector).
- Interfaces provide fewer variants than classes for declarations of methods using METHODS
and CLASS-METHODS. More specifically, no
constructors,
test methods, or
AMDP function implementations can be declared in interfaces for CDS table functions.
Example
Declaration of various components in an interface.
INTERFACE intf1.
...
ENDINTERFACE.
INTERFACE intf2.
INTERFACES intf1.
TYPES:
type ...
DATA:
attr TYPE ...
CLASS-METHODS:
factory RETURNING VALUE(ref) TYPE REF TO intf2.
METHODS:
meth ...
ENDINTERFACE.
CPI1466 during Backup CL_GUI_FRONTEND_SERVICES - Frontend Services
This documentation is copyright by SAP AG.
Length: 3187 Date: 20240419 Time: 215643 sap01-206 ( 41 ms )