ABAPINTERFACES_CLASS - INTERFACES CLASS
BAL Application Log Documentation PERFORM Short ReferenceThis documentation is copyright by SAP AG.
INTERFACES - ABSTRACT, FINAL, DATA VALUES
Syntax
INTERFACES intf
{ {[ABSTRACT METHODS meth1 meth2 ... ]
[FINAL METHODS meth1 meth2 ... ]}
| [ALL METHODS {ABSTRACT|FINAL}] }
[DATA VALUES attr1 = val1 attr2 = val2 ...].
Additions
1. ... ABSTRACT METHODS meth1 meth2 ...
2. ... FINAL METHODS meth1 meth2 ...
3. ... ALL METHODS {ABSTRACT|FINAL}
4. ... DATA VALUES attr1 = val1 attr2 = val2 ...
Effect
In the publicvisibilityarea, the statement INTERFACES implements the interface intf in the class. Additions can also be defined to determine the properties of interface components in the class.
All local or global interfaces visible at this position can be specified for intf. The componentsof the interfaces become public components of the class after the implementation. An interface componentcalled comp has the name intf~comp in the class, where intf is the name of theinterface and the character ~ is the interface component selector. A class must implement all methods of the interface in its implementation part unless they are declared as abstract.
Notes
- A class can implement any number of different interfaces. All of the interfaces implemented by a classare of equal status. If one of the interfaces intf implemented in a class is a composite, forexample, containing component interfaces, then these are implemented in the class irrespective of theirnesting hierarchy like individual interfaces and their components are not called using the name intf but using the name of their component interface. The multiple use of the interface component selector in an identifier(intf1~intf2~comp) is not possible.
- Each interface appears only once in a class and every interface component compis always clearlyaccessible using the intf~comp. When the components of an interface, if they are components of more than one interface, appear to be used more than once in a class, even they appear only once.
- If a class implements in its implementation part an intf~... method of a global interface intfthat is implemented with INTERFACES and if it is not declared in the interface, then a warningis displayed in the syntax check. This type of method implementation is dead coding that cannot be executedand is to be removed. Classes become unusable with a syntax error if methods were later deleted froman implemented global interface, and which were implemented without class and had no values. An actual syntax error results when local interfaces are used.
Addition 1
... ABSTRACT METHODS meth1 meth2 ...
Addition 2
... FINAL METHODS meth1 meth2 ...
Effect
Using the additions ABSTRACT METHODS and FINAL METHODS the individual instance methodsmeth of the interface are made either abstract or final in the class to be implemented. Thesame rules apply as for the additions ABSTRACT and FINAL of the METHODS statement. In particular, the whole class must be abstract if an interface method ismade abstract and no interface methods can be executed at the same time after ABSTRACT METHODS and FINAL METHODS.
Addition 3
... ALL METHODS {ABSTRACT|FINAL}
Effect
Instead of making individual interface methods in the class abstract or final you can, using the ALL METHODS {ABSTRACT|FINAL} addition, make all interface methods either abstract or final.
Addition 4
... DATA VALUES attr1 = val1 attr2 = val2 ...
Effect
With the DATA VALUES addition, you can assign initial values to individual attributes attr. This addition performs the same function for the instance attributes as the addition VALUEoftheDATA statementfor class-specific attributes.Constants that are declared in the interface with the CONSTANTSstatement cannot be specified after the addition DATA VALUES. Furthermore, it is not currently possible to specifyalias names.
Note
To specify values for the interface attributes of thecomponentinterfaces of a compound interface, the component interface must currently be directly bound again using the INTERFACES statement.
General Data in Customer Master BAL Application Log Documentation
This documentation is copyright by SAP AG.
Length: 6303 Date: 20120522 Time: 234336 triton ( 216 ms )






