SAP INTERFACE ABAP Statements



Get Example source ABAP code based on a different SAP table
  


ID INTERFACE
• INTERFACE ABAP Statement

INTERFACE
Short Reference

ABAP_SYNTAX_FORMS

Declaration of Interfaces
1 INTERFACE intf $[PUBLIC$].
$[components$]
ENDINTERFACE.

Deferred Interfaces
2 INTERFACE intf DEFERRED $[PUBLIC$].

What does it do?
The statement INTERFACE defines interfaces in ABAP Objects or defers their declaration.
The definition of an interface consists of a declaration section that starts with INTERFACE and is closed using ENDINTERFACE. Unlike classes, an interface does not have an implementation part.
The variant of INTERFACE without ENDINTERFACE is used for deferring interfaces in a program.
The statements INTERFACE and associated statements ENDINTERFACE can only be specified in the global context of a program. INTERFACE and ENDINTERFACE cannot be specified within classes, procedures,
BEGIN_SECTION VERSION 5 OUT and processing blocks implemented internally as a procedure, that is, event blocks for GET and AT SELECTION-SCREEN)
END_SECTION VERSION 5 OUT . This applies in particular to the variant of INTERFACE specified here, which is not closed using ENDINTERFACE.



Latest notes:

The definition or deferral of an interface is handled like other declaration statements (DATA, TYPE, ...). In a processing block without a local context, they are handled like global program declarations and do not close the processing block.
NON_V5_HINTS
Previously, an obsolete variant INTERFACE ... LOAD was used to load interfaces explicitly.
ABAP_HINT_END

Return to menu