sapdev logo background
sapdev logo sapdev logo
Comments

ABAP INTERFACE Statement syntax, information and example SAP source code



Return to Statement index



INTERFACE

Short Reference

ABAP Syntax:
Declaration of Interfaces

1 INTERFACE intf [PUBLIC].
[ components ]
ENDINTERFACE.

Advance Declaration of Interfaces

2 INTERFACE intf DEFERRED [PUBLIC].

What does it do? The statement INTERFACE defines interfaces or declares them in advance.
The definition of an interface consists of a declaration part that starts with
INTERFACE and is ended using ENDINTERFACE . Unlike classes, an interface does not have an implemenation part.
Additional variants of INTERFACE without ENDINTERFACE are used for the advance declaration of interfaces in a program.
The statements INTERFACE and associated statements
ENDINTERFACE can be specified only in the global context of a program. INTERFACE and ENDINTERFACE cannot be specified within classes, procedures, and processing blocks implemented internally as a procedure (event blocks for GET and AT SELECTION-SCREEN ). This applies in particular to the variant of INTERFACE specified here, which is not closed using ENDINTERFACE .
Latest notes: The definition or advance declaration 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 end the processing block.
The obsolete variant INTERFACE ... LOAD was used to load interfaces explicitly.
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved




INSERT_UPDATE_MODIFY_CONN
INTERFACE-POOL




comments powered by Disqus