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

How to write infopackage program to pick up a certain file from the application server

Using ABAP in combination with SAP HANA