SAP ABAP STATEMENTS



Get Example source ABAP code based on a different SAP table
  


• . ABAP_ELEMENT

ABAP Statements
ABAP statements consist of the following tokens and always end with a period ( .):
ABAP words
Operands at Operand Positions
Operators
Specific ABAP words, operands, and operators can be combined to
expressions,
which can be specified at certain operand positions.
A special syntax allows a set of statements to be written as
chained statements.
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 limited to a line of the source code.
There is no case-sensitivity and in addition to ABAP words, operands, and operators, the following special characters can be used:
If multiple similar expressions are combined into one expression with operators, the priority of the individual operations can be determined using parentheses (()).
When calling functions and methods, parentheses (()) are used.
Lists of operands are expressed by parentheses (()) and commas ( ,) in specific positions.
When forming a chained statement, a colon (:) and commas (,) can be used.
There are single special characters such as parentheses for determining the priority in expressions that must be separated from other tokens by a blank character. Other special characters do not need to be separated by a blank, for example, the closing period.



Latest notes:

NON_V5_HINTS
Some special characters as hyphens (-) or angle brackets (-> ) are parts of operands. Other special characters as square brackets ([ ]), curly brackets ({ }) or the vertical bar (|) are part of expressions.
Some expressions use obsolete syntax forms that can still occur outside classes, where the separators between the tokens can be omitted.
The absolute maximum length of an ABAP statement is 128 x 1024 characters = 131072 characters. However, the actual maximum number of characters in a statement also depends on the number of tokens and the use of literals. In general, a statement can consist of almost 130000 characters. In chained statements, however, there are only a maximum of 28400 characters per statement.
ABAP_HINT_END
BEGIN_SECTION SAP_INTERNAL_HINT
Undocumented feature: The space before a closing and sometimes after an opening bracket can be omitted if the last or the first operand is a text literal within quotes.
END_SECTION SAP_INTERNAL_HINT

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