ABAPINTERFACE_DEFINITION - INTERFACE DEFINITION

PERFORM Short Reference   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.

INTERFACE intf

Short Reference



Syntax

INTERFACE intf [PUBLIC].
  [components]
ENDINTERFACE.

Addition:

... PUBLIC

Effect

The statement block INTERFACE - ENDINTERFACE defines aninterface intf.Naming conventionsapply to the name intf. The componentsof the interface are declared between INTERFACE and ENDINTERFACE.

Note

The definition of an interface can only be specifed in the context described under INTERFACE.

Addition

... PUBLIC

Effect

If you use the PUBLIC addition, the interface ifac becomes a global interface of the class library. The PUBLIC addition can only be used for the global interface of aninterface pool and is generated by theClass Builder when a global interface is created.

Example

INTERFACE i1.
  DATA    a1 TYPE string.
  METHODS m1.
  EVENTS  e1 EXPORTING value(p1) TYPE string.
ENDINTERFACE.

CLASS c1 DEFINITION.
  PUBLIC SECTION.
    INTERFACES i1.
ENDCLASS.

CLASS c1 IMPLEMENTATION.
  METHOD i1~m1.
    RAISE EVENT i1~e1 EXPORTING p1 = i1~a1.
  ENDMETHOD.
ENDCLASS.

In this example, an interface i1 is declared using three interface components a1, m1, and e1. The class c1 implements the interface and the interface components therefore becomepublic components of the class, which can be addressed using the interface component selector(~).


SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.


Length: 2976 Date: 20120522 Time: 234823     triton ( 70 ms )