IF
Conditional branch.
Introduces a new branch.
A D V E R T I S E M E N T
Syntax
IF <logexp>.
Opens an IF control
structure that ends with an ENDIF statement. The system evaluates the logical
expression <logexp>, and processes different statement blocks depending on the
result.
IMPORT
Imports data clusters.
Syntax
IMPORT� <fi>
[TO <g i>]� | (<itab>)
FROM MEMORY
| DATABASE <dbtab>(<ar>) ID(<key>)
| SHARED BUFFER <dbtab>(<ar>) ID(<key>).
The data objects <fi>
or <g i>, or the data objects in the internal table <itab> are read
from data clusters, either in the cross-program ABAP memory of the current
internal session; in a cluster database table <dbtab>; or in the
cross-transaction application buffer of the table <dbtab> and written to the
variables <f i> and <g i>.
IMPORT DIRECTORY
Creates the directory of a
data cluster from a cluster database.
Syntax
IMPORT DIRECTORY INTO
<itab>
FROM DATABASE <dbtab>(<ar>)
Id <key>.
Writes a directory of the
data objects belonging to a data cluster in the cluster database <dbtab> to the
internal table <dirtab>.
In the third variant, the
table <itab> contains a directory of the objects stored using EXPORT TO
DATABASE.
INCLUDE
Inserts an include program
in another program.
Syntax
INCLUDE <incl>.
Has the same effect as
copying the source code of the include program <incl> into the program. Include
programs are not loaded at runtime, but are expanded when the program is
generated. Include programs must have the program type I.
INCLUDE TYPE|STRUCTURE
Includes a structure
within another.
Syntax
INCLUDE TYPE <t>|STRUCTURE
<s> [AS <name> [RENAMING WITH SUFFIX <suffix>]].
Within a structure
declared using TYPES|DATA BEGIN OF, copies a structured datatype <t>, or a
structure <s> already available as a data object, as part of the structure
declaration. The AS addition lets you address the individual components using
the name <name>. The RENAMING addition lets you append a suffix, <suffix>, to
<name>, so that you can copy the same structure several times.
INITIALIZATION
Event keywords for
defining event blocks for reporting events.
Syntax
INITIALIZATION.
Only occurs in executable
programs. The ABAP runtime environment triggers the INITIALIZATION event before
the selection screen is processed, at which point the corresponding event block
is processed.
INSERT for Database Tables
Inserts entries from
database tables.
Syntax
INSERT <dbtab> FROM <wa>.
INSERT <dbtab> FROM TABLE
<itab> [ACCEPTING DUPLICATE KEYS].
Inserts one line from the
work area <wa> or several lines from the internal table <itab> into the database
table <dbtab>. The ACCEPTING DUPLICATE KEYS addition prevents a runtime error
from occurring if two entries have the same primary key. Instead, it merely
discards the duplicate
INSERT for Field
Groups
Defines the structure of
field groups for extract datasets.
Syntax
INSERT <f1>� <f
n> INTO <fg>.
Includes the fields <fi>
in the field group <fg>, thus defining a line structure for an extract dataset.
INSERT for any
Internal Table
Inserts lines from
internal tables of any type.
Syntax
INSERT <line>|LINES OF
<jtab> [FROM <n1>] [TO <n 2>]
INTO TABLE <itab>
[ASSIGNING <FS> | REFERENCE INTO <dref>].
Inserts a line <line> or a
set of lines from the internal table <jtab> into the internal table <itab>. If
<jtab> is an index table, you can use the FROM and TO additions to restrict the
lines inserted. 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.
INSERT for Index
Tables
Inserts entries in index
tables.
Syntax
INSERT <line>|LINES OF
<jtab> [FROM <n1>] [TO <n 2>]
INTO <itab> [INDEX <idx>]
[ASSIGNING <FS> | REFERENCE INTO <dref>].
Inserts a line <line> or a
set of lines from the internal table <jtab> into the internal table <itab>before
the line with the index <idx>. If <jtab> is an index table, you can use the FROM
and TO additions to restrict the lines inserted. If you omit the INDEX addition,
you can only use the statement within a LOOP. A new line containing values is
inserted before the current line. 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.
INSERT for Programs
Inserts ABAP programs into
the program library.
Syntax
INSERT REPORT <prog> FROM
<itab>.
The lines of the internal
table <itab> are added to the program library as the program <prog>.
INTERFACE
Declares a interface in
ABAP Objects.
Syntax
INTERFACE <ifac>
[DEFERRED]
[LOAD].
Introduces an interface
<interface>. The definition ends with ENDINTERFACE and contains the declaration
of all the components of the interface. The DEFERRED addition makes the
interface known to the program before it is defined. The LOAD addition loads an
interface explicitly from the Class Library.
INTERFACES
Implementation or nesting
of an interface in ABAP Objects.
Syntax
INTERFACES <ifac>
[ABSTRACT|FINAL METHODS <meth1> <meth 2> | ALL METHODS
ABSTRACT|FINAL ]
[DATA VALUES <attr1> = <val 1> <attr 2> = <val
2> �]
MESSAGE
Displays a message.
Syntax
MESSAGE <xnnn> [WITH <f1>�
<f4>] [RAISING <except>].
MESSAGE ID <mid> TYPE <x>
NUMBER <nnn>.
MESSAGE <xnnn>(<mid>).
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.
NEW-LINE
Inserts a line break in a
list.
Syntax
NEW-LINE
[NO-SCROLLING|SCROLLING].
Positions the list display
after the page header. The NO-SCROLLING addition prevents the new line from
scrolling horizontally. SCROLLING resets the NO-SCROLLING addition.
NEW-PAGE
Inserts a page break in a
list.
Syntax
NEW-PAGE [NO-TITLE|WITH-TITLE]
[NO-HEADING|WITH-HEADING]
[LINE-COUNT]
[LINE-SIZE]
[PRINT ON|OFF].
Generates a new page and
positions the list output after the page header. The additions control how the
page header is displayed, the length and width of the page, and the print
output.
NODES
Declares an interface work
area.
Syntax
NODES <node>.
Declares a variable with
the same data type and the same name as a data type from the ABAP Dictionary.
Structures in main programs and subroutines declared using NODES use a common
data area. This statement is used in conjunction with logical databases.
ON CHANGE
Introduces a new branch.
Syntax
ON CHANGE OF <f> [OR <f1>
OR <f2>�].
Opens an ON control
structure, which ends with ENDON. The statement block is executed whenever the
contents of the field <f> or one of the other fields <fi> has changed since the
statement was last executed.
OPEN CURSOR
Opens a database cursor.
Syntax
OPEN CURSOR [WITH HOLD]
<c> FOR SELECT <result>
FROM <source>
[WHERE <condition>]
[GROUP BY <fields>]
[HAVING <cond>]
[ORDER BY <fields>].
Opens a cursor <c> with
type CURSOR for a SELECT statement. You can use all the clauses of the SELECT
statement apart from the INTO clause. The INTO clause is set in the FETCH
statement. If you use the WITH HOLD addition, the cursor is not closed when a
database commit occurs.
OPEN DATASET
Opens a file.
Syntax
OPEN DATASET <dsn>
[FOR INPUT|OUTPUT|APPENDING|UPDATE]
[IN BINARY MODE
|IN TEXT MODE [ENCODING (DEFAULT|UTF-8|NON-UNICODE)]
|IN LEGACY BINARY MODE [(BIG|LITTLE) ENDIAN] [CODE PAGE <cp>]
|IN LEGACY TEXT MODE [(BIG|LITTLE) ENDIAN] [CODE PAGE <cp>]]
[REPLACEMENT CHARACTER <rc>]
[IGNORING CONVERSION ERRORS]
[AT POSITION <pos>]
[TYPE <c>]
[MESSAGE <mess>]
[FILTER <filt>].
Opens a file <dsn> on the
application server. The additions after FOR specify how the file is read or
written. The MODE additions specifies how content is interpreted (as characters
or in binary form). The ENCODING addition specifies the character representation
in the file. The LEGACY MODE allows you to read files that were written before
Release 6.10. REPLACEMENT CHARACTERS and CONVERSION ERRORS are used to handle
errors during character set conversion. AT POSITION specifies the position in
the file. MESSAGE specifies where system messages are stored. FILTER lets you
specify operating system commands.
OVERLAY
Overlays one string with
another:
Syntax
OVERLAY <c1> WITH <c2>
[ONLY <str>].
This statement overlays
all positions in field <c1> containing letters which occur in <str> with the
contents of <c2>.
<c2>
remains unchanged. If you
omit ONLY <str>, all positions of <c1> containing spaces are overwritten.
|