TABLES: SFLIGHT.
types: begin of ty_sflight,
carrid type sflight-carrid,
connid type sflight-connid,
fldate type sflight-fldate,
planetype type sflight-planetype,
seatsmax type sflight-seatsmax,
seatsocc type sflight-seatsocc,
end of ty_sflight.
data: i_flight type standard table of ty_sflight,
wa_flight like line of i_flight.
data: g_flight type standard table of ty_sflight with header line.
start-of-selection.
select carrid connid fldate planetype seatsmax seatsocc
from sflight
into table i_flight.
IF sy-subrc <> 0.
write: 'There were no fields found in sflight.'.
exit.
ENDIF.
*EXPORT i_flight TO DATABASE indx(bb) ID 'G.ZHOU'.
*import i_flight to g_flight from database indx(bb) id 'G.ZHOU'.
*delete from database indx(AA) ID 'G.ZHOU'.
*delete from database indx(BB) ID 'G.ZHOU'.
*delete from database indx(YY) ID 'G.ZHOU'.
export i_flight to memory id 'G.ZHOU'.
import i_flight to g_flight from memory id 'G.ZHOU'.
free memory id 'G.ZHOU'.
IF sy-subrc <> 0.
message e001(operation_failed) with text-001.
stop.
ENDIF.
LOOP AT g_flight.
write: / g_flight-carrid.
ENDLOOP.
end-of-selection.
内存数据簇和数据库数据簇使用实例
最新推荐文章于 2023-01-17 20:21:21 发布