Chained Statements in ABAP

 The ABAP Programming language allows you to concatenate consecutive statements with an identical left part into a chain statement.

Chain statement:

WRITE: spfli-cityfrom, spfli-cityto, spfli-airpto.

Statement Sequence:

WRITE spfli-cityfrom.

WRITE spfli-cityto.

WRITE spfli-airpto.

You could for example, write the same statement like this:

WRITE: spfli-cityfrom,

       spfli-cityto,

       spfli-airpto.

Statement Sequence:

sum = sum + 1.

sum = sum + 2.

sum = sum + 3.

sum = sum + 4.

Chain Statement:

sum = sum + : 1, 2, 3, 4.

 

Comments

Popular posts from this blog

Domains and Data Elements

Sample ABAP program for Updating notepad file data to Internal table and Sending it to Application server

OPEN SQL EXAMPLES IN ABAP – PART 2