SAP CHAINED STATEMENTS
Get Example source ABAP code based on a different SAP table
• : ABAP_ELEMENT
• , ABAP_ELEMENT
Chained Statements
ABAP_SYNTAX
remaining_part2,
... .>
Consecutive statements that have the same initial part can be combined into in a single chained statement as follows:
When the syntax is checked and the program is executed, a chained statement is handled in the same way as the corresponding sequence of individual ABAP statements.
ABAP_PGL
ABAP_PGL_END
Latest notes:
NON_V5_HINTS
ABAP_HINT_END
ABAP_EXAMPLES
Typical use of a chained statement:
The complete syntax of the four statements is:
Chained statement in which more than just the keyword is separated:
The complete syntax of the three statements is:
Incorrect use of a chained statement in AB_SQL .
telephone = '0621/444444'
WHERE id = '00017777'.>
This code fragment does not represent an individual statement that updates the discount and phone number of customer 00017777. Instead, there are two statements: the first changes the discount for all customers, and the second changes the phone number of customer 00017777.
Chained statements without commas:
ADD :1 TO :num.
num :+= :1.>
The colons are all handled like blanks.
The following syntax is correct but meaningless:
num =: 5, 6, 7.>
Both chained statements represent:
num = 6.
num = 7.>
And the effect is the same as:
ABAP_EXAMPLE_END