" Declaration of type
TYPES: BEGIN OF ty_flightb,
id TYPE fl_id,
dat TYPE fl_date,
seatno TYPE fl_seatno,
firstname TYPE fl_fname,
lastname TYPE fl_lname,
fl_smoke TYPE fl_smoker,
classf TYPE fl_class,
classb TYPE fl_class,
classe TYPE fl_class,
meal TYPE fl_meal,
service TYPE fl_service,
discout TYPE fl_discnt,
END OF lty_flightb.
" Declaration of internal table
DATA t_flightb TYPE STANDARD TABLE OF ty_flightb.
DATA t_flightb TYPE STANDARD TABLE OF flightb.
Requires ABAP version > 7.4
TYPES t_itab TYPE STANDARD TABLE OF i WITH EMPTY KEY.
DATA(t_inline) = VALUE t_itab( ( 1 ) ( 2 ) ( 3 ) ).
In ABAP there are tables with header lines, and tables without header lines. Tables with header lines are an older concept and should not be used in new development.
Internal Table: Standard Table with / without header line
This code declares the table i_compc_all
with the existing structure of compc_str
.
DATA: i_compc_all TYPE STANDARD TABLE OF compc_str WITH HEADER LINE.
DATA: i_compc_all TYPE STANDARD TABLE OF compc_str.
Internal Table: Hashed Table with / without header line
DATA: i_map_rules_c TYPE HASHED TABLE OF /bic/ansdomm0100 WITH HEADER LINE
DATA: i_map_rules_c TYPE HASHED TABLE OF /bic/ansdomm0100
Declaration of a work area for tables without a header
A work area (commonly abbreviated wa) has the exact same structure as the table, but can contain only one line (a WA is a structure of a table with only one dimension).
DATA: i_compc_all_line LIKE LINE OF i_compc_all.