SAP ABAP STATEMENTS

Get Example source ABAP code based on a different SAP table
  


ARTICLE
• . ABAP_ELEMENT

ABAP Statements
ABAP statements consist of the following tokens and end with a period (.).
ABAP words

Operands

Operators

Certain ABAP words, operands and operators form
expressions,
which can be specified at certain operand positions.
The tokens of a statement must be separated by at least one blank or a line break. Otherwise, blanks and line breaks between tokens are not significant. An ABAP statement is not restricted to a line in the source text.
No distinction is made between upper and lowercase letters. Apart from ABAP words, operands and operators, you can also use the following special characters:
If a number of expressions of the same type with operators are linked to an expression, the priority of the individual operations can be defined usig round brackets (()).

For the purpose of calling functions and methods, round brackets (() ) can sometimes be used.

Lists of operands are expressed by round brackets (()) and commas (,) in certain positions.

When forming a chained statement, a colon (:) and commas (,) can be used.

A number of free-standing special characters, such as round brackets for setting the priority, need to be separated from other tokens by an empty character. Other special characters - as well as the period at the end - do not have to be separated by an empty character.

Note
Obsolete syntax forms can still occur in all objects apart from classes. In such cases, you can omit the separators between the tokens.
INTHINT Undocumented feature: The space before a closing and
INTHINT sometimes after an opening bracket can be omitted if the last
INTHINT or the first operand is a text literal within quotes.

Example
ABAP statement with the keyword DELETE, the addition WHERE , the operators =, <(><<)>, >, AND, OR , the operands itab, col1, op1, col2, op2, col3, op3 and round brackets.
DELETE itab
WHERE ( col1 = op1 AND ( col2 > op2 OR col3 <(><<)> op3 ) ).