You can only use this
statement in a TRY-ENDTRY block, where you define a handler for one or more
class-based exceptions. You can use INTO to place a reference to the exception
object into the reference variable <ref>.
Introduces a CATCH area,
which ends with an ENDCATCH statement. If a catchable runtime error <excepti>,
occurs between CATCH and ENDCATCH, the current processing block is interrupted.
The system jumps to the appropriate ENDCATCH statement and fills SY-SUBRC with
<rc i>.
CHECK
Conditionally leaves a
loop or processing block.
Syntax
CHECK <logexp>.
If the logical expression
<logexp> is true, the system continues with the next statement. If it is false,
processing within the loop is interrupted at the current loop pass, and the next
loop pass is performed. Otherwise the system leaves the current processing
block. In conjunction with selection tables, and inside GET events, you can use
an extra variant of the CHECK statement.
CLASS Declaration
Declares a class in ABAP
Objects.
Syntax
CLASS <class> DEFINITION
[PUBLIC]
[INHERITING FROM <superclass>]
[ABSTRACT]
[FINAL]
[CREATE PUBLIC|PROTECTED|PRIVATE]
[FRIENDS <cif1> <cif 2> �]
[DEFERRED]
[LOAD].
Introduces the declaration
part of a class, <class>. The declaration part ends with ENDCLASS and contains
the declaration of all the components of the class. The PUBLIC addition is
generated only by the Class Builder. It defines a global class in the Class
Library. The INHERITING FROM addition lets you derive the class, <class>, from a
superclass, <superclass>. The ABSTRACT addition defines an abstract class, which
cannot be instantiated. The FINAL addition defines a class that cannot have any
subclasses. The CREATE addition specifies who can instantiate the class. FRIENDS
allows you to specify other classes or interfaces, <cif> that can access the
private components of the class and instantiate objects of the class,
independently of the CREATE addition. The DEFERRED addition makes the class
known to the program before it is declared. The LOAD addition loads a class
explicitly from the Class Library.
CLASS � Implementation
Implements a class in ABAP
Objects.
Syntax
CLASS <class>
IMPLEMENTATION.
Introduces the
implementation part of a class, <class>. The implementation part ends with
ENDCLASS and contains the implementation of all the components of the class.
CLASS-DATA
Declares static attributes
of a class or interface.
Syntax
CLASS-DATA <a>�
Like DATA. However, the
attribute <a> is declared as a static attribute. Static attributes are not
instance-specific. Their content is shared by all instances.
CLASS-METHODS
Declares static methods of
a class or interface.
Syntax
CLASS-METHODS <meth>�
Like METHODS, except that
the method <meth> is declared as a static method. A static method can access
static attributes and can only trigger static events.
CLASS-EVENTS
Declares static events of
a class or interface.
Syntax
CLASS-EVENTS <evt>�
Like EVENTS, except that
the event <evt> is declared as a static attribute. Static events are the only
type of event that can be triggered in a static method.
CLEANUP
Tidies up after
class-based exceptions.
CLEANUP.
Can only be used within a
TRY-ENDTRY block, where it defines a control block. If a class-based exception
is not caught with a CATCH statement, the system executes the statements between
CLEANUP and ENDTRY, before passing the exception along the call hierarchy.
CLEAR
Sets a variable to its
initial value.
Syntax
CLEAR <f>.
The variable <f>, which
can have any data type, is set to an initial value appropriate to its type.
CLOSE DATASET
Closes a file.
Syntax
CLOSE DATASET <dsn>.
Closes a file opened with
OPEN DATASET on the application server.
CLOSE CURSOR
Closes a database cursor.
Syntax
CLOSE CURSOR <c>.
Closes a cursor opened
with OPEN CURSOR.
COLLECT
Aggregates lines and then
adds them to an internal table.
Syntax
COLLECT <line> INTO <itab>
[ASSIGNING <FS> | REFERENCE INTO <dref>].
The system checks whether
there is already a table entry that matches the key. If there is no
corresponding entry already in the table, the COLLECT statement has the same
effect as INSERT. If an entry with the same key already exists, the COLLECT
statement does not append a new line, but adds the contents of the numeric
fields in the work area <line> to the contents of the fields in the existing
entry. If you use ASSIGNING or INTO REFERENCE, field symbol <FS> refers to the
inserted line or the relevant data reference is stored in <dref> after the
statement.
COMMIT
Closes a SAP LUW.
Syntax
COMMIT WORK [AND WAIT]
Writes all the database
changes and releases all the database locks. Triggers updating. The AND WAIT
addition forces the program to wait until the system has finished updating the
database. Otherwise, updating is asynchronous.