SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
ABAP Keyword Documentation → ABAP − Reference → Declarations → Declaration Statements → Classes and Interfaces →Syntax Forms
Declaration Part of a Class
1. CLASS class DEFINITION
[class_options].
[PUBLIC SECTION.
[components]]
[PROTECTED SECTION.
[components]]
[PRIVATE SECTION.
[components]]
ENDCLASS.
Implementation Part of a Class
2. CLASS class IMPLEMENTATION.
...
METHOD ...
...
ENDMETHOD.
...
ENDCLASS.
Publication of Classes
3. CLASS class DEFINITION DEFERRED [PUBLIC].
Local Friends of Global Classes
4. CLASS class DEFINITION
LOCAL FRIENDS class1 class2 ...
intf1 intf2 ... .
Effect
The statement CLASS defines a class class, publishes it, or specifies properties.
The statements CLASS and associated statements ENDCLASS can be specified only in the global context of a program. CLASS and ENDCLASS 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 variants of CLASS specified here, which is not closed using ENDCLASS.
Notes