1. ... STRUCTURE s DEFAULT wa
2. ... TYPE t
3. ... TYPE LINE OF t
4. ... LIKE s
5. ... LIKE LINE OF s
This statement declares a symbolic field called
<fs>. At runtime, you can assign a concrete field to the field
symbol using ASSIGN . All operations
performed with the field symbol then directly affect the field assigned
You can only use one of the additions.
Output aircraft type from the table SFLIGHT
using a field symbol:
ASSIGN SFLIGHT-PLANETYPE TO <PT>.
... STRUCTURE s DEFAULT wa
Assigns any (internal) field string or
structure to the field symbol from the ABAP/4
Dictionary ( s ). All fields of the structure can be addressed
by name: <fs>-fieldname . The structured field symbol
points initially to the work area wa specified after
The work area wa must be at least as long as the structure
s . If s contains fields of the type I or F, wa
should have the structure s or at least begin in that way, since
otherwise alignment problems may occur.
Address components of the flight bookings table
SBOOK using a field symbol:
DATA SBOOK_WA LIKE SBOOK.
FIELD-SYMBOLS <SB> STRUCTURE SBOOK
WRITE: <SB>-BOOKID, <SB>-FLDATE.
... TYPE t
... TYPE LINE OF t
... LIKE s
... LIKE LINE OF s
You can use additions 2 to 5 to type field symbols in
the same way as FORM parameters (see
also Type assignment of subroutine parameters).
ASSIGN performs the same type checks as with
USING parameters of FORM s.
© SAP AG 1996