Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014aUaQeLnwbb1zTpN7kHeat
25 lines
1.0 KiB
ABAP
25 lines
1.0 KiB
ABAP
CLASS {{p}}flight_seed DEFINITION PUBLIC FINAL CREATE PUBLIC.
|
|
PUBLIC SECTION.
|
|
INTERFACES if_oo_adt_classrun.
|
|
ENDCLASS.
|
|
|
|
CLASS {{p}}flight_seed IMPLEMENTATION.
|
|
METHOD if_oo_adt_classrun~main.
|
|
DELETE FROM {{p}}flight.
|
|
DELETE FROM {{p}}airport.
|
|
INSERT {{p}}airport FROM TABLE @( VALUE #(
|
|
( airport = 'AAA' name = 'ALPHA' )
|
|
( airport = 'BBB' name = 'BETA' )
|
|
( airport = 'DDD' name = 'DELTA' ) ) ).
|
|
INSERT {{p}}flight FROM TABLE @( VALUE #(
|
|
( flight_id = 1 dest = 'AAA' flight_date = '20260110' pax = 100 )
|
|
( flight_id = 2 dest = 'AAA' flight_date = '20260210' pax = 50 )
|
|
( flight_id = 3 dest = 'BBB' flight_date = '20260115' pax = 300 )
|
|
( flight_id = 4 dest = 'CCC' flight_date = '20251231' pax = 500 )
|
|
( flight_id = 5 dest = 'CCC' flight_date = '20260301' pax = 20 )
|
|
( flight_id = 6 dest = 'BBB' flight_date = '20260120' pax = 100 )
|
|
( flight_id = 7 dest = 'DDD' flight_date = '20260125' pax = 150 ) ) ).
|
|
out->write( sy-dbcnt ).
|
|
ENDMETHOD.
|
|
ENDCLASS.
|