SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
ABAP Keyword Documentation → ABAP − Reference → ABAP Syntax →Chained Statements
Consecutive statements that have the same initial part can be combined into one chained statement. To do this, the identical initial part is specified once and closed with a colon (:). The remaining parts are then listed separately, divided by commas (,) and closed with a period (.). When the syntax is checked and the program executed, the chained statement is handled the same way as the single ABAP statements would be in their defined sequence.
Programming Guideline
Only use chained statements where appropriate
Notes
Examples
Typical use of a chained statement:
The complete syntax of the four statements is:
Chained statement, in which more than the key word is truncated:
The complete syntax of the three statements is:
Incorrect use of a chained statement in Open SQL:
The code fragment does not represent an individual statement that updates the discount and phone number of customer 00017777. Instead, these are two statements. The first changes the discount for all customers and the second changes the phone number of customer 00017777.