04-15-2008 3:59 PM
"Create ITAB_DISPLAY structure as; CARRID, TOTAL, <FS-W1>, <FS-W2>, etc.
<FS-W1> is value from SFLIGHT-PLANETYPE.
Use field-symbols in this case."
Does anyone know how to code the above statement? I totally don't have any idea about it. I meet difficulties when code the internal table along with the using of field symbols also.
Thanks in advance.
04-15-2008 4:09 PM
hi jiansi,
you cannot use a field symbol as part of a structure for an internal table.
although you can assign values of an internal table into a field symbol.
here is an example
LOOP AT itab_display INTO wa_display.
ASSIGN wa_display-carrid TO <fs-w1>.
ASSIGN wa_display-total TO <fs-w2>.
ENDLOOP.
regards,
Peter
04-15-2008 4:09 PM
hi jiansi,
you cannot use a field symbol as part of a structure for an internal table.
although you can assign values of an internal table into a field symbol.
here is an example
LOOP AT itab_display INTO wa_display.
ASSIGN wa_display-carrid TO <fs-w1>.
ASSIGN wa_display-total TO <fs-w2>.
ENDLOOP.
regards,
Peter
04-15-2008 4:55 PM
tnx Peter Ruiz .
erm......my statement here is to display some fields :- carrid, total and a list of plantype. Bcz of the number of plane type is dynamic one.
so, what should i do??
04-16-2008 4:08 AM
hi,
you can loop through your internal table that contains the plantype.
here is an example on how to use a field symbol
data:
itab1 type standard table of sflight.
field-symbol:
<wa_fs> type any.
loop at itab1 assigning <wa_fs>.
write <wa_fs>-plantype.
endloop.
hope it helps.
peter
04-16-2008 2:08 AM