Files
abap-llm/tasks_gen/train/G1141/seed/t31_seed.clas.abap
2026-10-05 18:02:52 +02:00

27 lines
1.3 KiB
ABAP

CLASS {{p}}t31_seed DEFINITION PUBLIC FINAL CREATE PUBLIC.
PUBLIC SECTION.
INTERFACES if_oo_adt_classrun.
ENDCLASS.
CLASS {{p}}t31_seed IMPLEMENTATION.
METHOD if_oo_adt_classrun~main.
DELETE FROM {{p}}visit.
DELETE FROM {{p}}exhib.
INSERT {{p}}exhib FROM TABLE @( VALUE #(
( exhib_id = 'E100' exhib_name = 'Ancient Egypt' plan_vis = 5000 )
( exhib_id = 'E200' exhib_name = 'Modern Art' plan_vis = 3000 )
( exhib_id = 'E300' exhib_name = 'Dinosaurs' plan_vis = 4000 )
( exhib_id = 'E400' exhib_name = 'Space' plan_vis = 2000 ) ) ).
INSERT {{p}}visit FROM TABLE @( VALUE #(
( visit_id = 1 exhib_id = 'E100' visit_date = '20260105' visitors = 1200 )
( visit_id = 2 exhib_id = 'E100' visit_date = '20260106' visitors = 900 )
( visit_id = 3 exhib_id = 'E200' visit_date = '20260105' visitors = 400 )
( visit_id = 4 exhib_id = 'E300' visit_date = '20260107' visitors = 2500 )
( visit_id = 5 exhib_id = 'E300' visit_date = '20260108' visitors = 1800 )
( visit_id = 6 exhib_id = 'E400' visit_date = '20260109' visitors = 300 )
( visit_id = 7 exhib_id = 'E500' visit_date = '20260110' visitors = 700 )
( visit_id = 8 exhib_id = 'E100' visit_date = '20251220' visitors = 5000 ) ) ).
out->write( sy-dbcnt ).
ENDMETHOD.
ENDCLASS.