What is syntax for loop part two

Basic form

LOOP AT dbtab.

Addition

... VERSION vers

This variant is no longer maintained and should therefore not be used . Instead, please use a SELECT statement.

Effect

Loop processing of the database table dbtab .You must declare the table dbtab under TABLES in the program. dbtab is a table name which begins with "T" and consists of up to five characters.The processing is the same as for variant 1 (except that the system field SY-TABIX is not set). If you want to process the whole table, you must set all table fields to SPACE . Otherwise, the table fields you want to use as a generic argument must be filled beforehand.

Fields of type P and type N have an initial value other than SPACE . This means that fields of this type after CLEAR or MOVE SPACE TO ... are not set to SPACE .

In the case of tables which have arguments containing fields of type P or type N , the entire table header line must be set to SPACE ( MOVE SPACE TO dbtab , not (!) CLEAR dbtab ). It is preferable to use SELECT instead.

Addition

... VERSION vers

You should use this addition only if it is absolutely necessary. In some cases, you can (and it makes sense) to avoid this LOOP addition by using a generation program.

Effect

Specifies a dynamically definable table name. The field varaiable must be a 4-character C field which contains the table name. It is declared under PARAMETERS and evaluated at runtime. The entry read is always placed in the assigned table T.... .

ABAP TOPIC WISE COMPLETE COURSE

BDC OOPS ABAP ALE IDOC'S BADI BAPI Syntax Check
Interview Questions ALV Reports with sample code ABAP complete course
ABAP Dictionary SAP Scripts Script Controls Smart Forms
Work Flow Work Flow

No comments :

Post a Comment