Field Strings
FLIGHTREC1 TYPE FLIGHTREC1_TYPE.
CARRID LIKE SPFLI-CARRID,
SUM_FIELD TYPE SUM_FIELD_TYPE,
MOVE 'X' TO FLIGHTREC2-FLAG.
WRITE FLIGHTREC2-SUM_FIELD.
Notes:
Field Strings
You define field strings with the syntax DATA: BEGIN OF <field string>, ... , END OF <field string>
- Of course, you can also refer to a field string type using TYPE.
- You address the individual fields with the name of the field string followed by the field name.
- Table work areas declared with the TABLES statements are field strings. Thus the statement TABLES <dbtab> is the same as the statement DATA <dbtab> LIKE <dbtab>. However, the TABLES statement also makes the database table known in the ABAP/4 program as well. This is why a SELECT statement without a preceding TABLES statement leads to a syntax error.