Displays the message <nnn>
of message class <mid> as message type <x>. The message type specifies how the
message is displayed, and how the program reacts. The WITH addition allows you
to fill placeholders in the message text. The RAISING addition in function
modules and methods allows you to terminate the procedure and trigger the
exception <exception>.
MESSAGE <msg> TYPE <x>
This variant display a
string, <msg>, directly as a message of the type <x>.
METHOD
Introduces the
implementation of a method in a class.
Syntax
METHOD <meth>.
Only occurs in the
implementation part of classes. Introduces a statement block that ends with
ENDMETHOD. You do not have to specify any interface parameters, since these are
defined in the method declaration.
METHODS
Declares methods in
classes and interfaces.
Syntax
METHODS <meth> [FOR EVENT
<evt> OF <cif>]
IMPORTING� [VALUE(]<ii>[)] TYPE <t> [OPTIONAL]�
EXPORTING� [VALUE(]<ei>[)] TYPE <t> [OPTIONAL]�
CHANGING � [VALUE(]<ci>[)] TYPE <t> [OPTIONAL]�
RETURNING VALUE(<r>)
EXCEPTIONS � <ei>�
[ABSTRACT]
[FINAL]
[REDEFINITION].
You declare a method <met>
in the definition part of a class or in the definition of an interface: The
IMPORTING, EXPORTING, CHANGING, RETURNING, and EXCEPTIONS additions define the
parameter interface and exceptions of the method. The ABSTRACT addition defines
an abstract class, which cannot be implemented in the same class. The function
of a non-abstract method must be implemented using METHOD. The FINAL addition
prevents you from redefining the method in subclasses. The REDEFINITION addition
redefines a method of a superclass. The FOR EVENT addition declares an event
handler method for the <evt> event of a class or interface.
MODIFY for Database
Tables
Inserts or changes lines
in database tables.
Syntax
MODIFY <dbtab> FROM <wa>.
MODIFY <dbtab> FROM TABLE
<itab>.
Works like INSERT for
database tables, if there is not yet a line in the table with the same primary
key. Works like UPDATE if a line already exists with the same primary key.
MODIFY for any
Internal Table
Changes the content of
lines in internal tables of any type.
Syntax
MODIFY TABLE <itab> FROM <wa>
[TRANSPORTING <f1> <f 2>�]
[ASSIGNING <FS> | REFERENCE INTO <dref>].
Copies the work area <wa>
into the line of the internal table with the same table key as <wa>. If you use
ASSIGNING or INTO REFERENCE, field symbol <FS> refers to the modified line or
the relevant data reference is stored in <dref> after the statement. You can use
the TRANSPORTING addition to specify the exact components that you want to
change.
MODIFY <itab> FROM <wa>
TRANSPORTING <f1> <f 2>� WHERE <logexp>.
Copies the work area <wa>
into the line of the internal table for which the logical expression is true. In
each comparison of the logical expression, the first operand must be a component
of the line structure.
MODIFY for Index
Tables
Changes the content of
lines in index tables.
Syntax
MODIFY <itab> FROM <wa>
[INDEX <idx>] [TRANSPORTING <f1> <f 2>�]
[ASSIGNING <FS> | REFERENCE INTO <dref>].
Copies the work area <wa>
into the line of the internal table with the index <idx>. If you omit the INDEX
addition, you can only use the statement within a LOOP. In this case, you change
the current loop line If you use ASSIGNING or INTO REFERENCE, field symbol <FS>
refers to the modified line or the relevant data reference is stored in <dref>
after the statement.