if your structure is not in a dictionary i would recommend dynamic creation of the structure:
type-pools:
abap.
... (1) identify components required in your dynamic table
data:
ls_component type abap_componentdescr,
lt_component type abap_component_tab.
clear ls_component.
ls_component-name = 'CARRID'.
ls_component-type ?= cl_abap_typedescr=>describe_by_name( 'SFLIGHT-CARRID' ).
insert ls_component into table lt_component.
clear ls_component.
ls_component-name = 'CONNID'.
ls_component-type ?= cl_abap_typedescr=>describe_by_name( 'SFLIGHT-CONNID' ).
insert ls_component into table lt_component.
... (2) create structure description in accordance to componentdata:
lr_strucdescr type ref to cl_abap_structdescr.
if lt_component is not initial.
lr_strucdescr = cl_abap_structdescr=>create( lt_component ).
endif.
... (3) create table description for structure descriptiondata:
lr_tabledescr type ref to cl_abap_tabledescr.
lr_tabledescr = cl_abap_tabledescr=>create( p_line_type = lr_strucdescr ).
... (4) create table
data:
lr_data_table type ref to data.
create data lr_data_table type handle lr_tabledescr.
field-symbols:
type standard table.
assign lr_data_table-> to .
... (5) fill table (from database)select * from sflight into corresponding fields of table .