In PAI i am trying to create new records into a db table (ztable) from an internal table.
my code is as follow.
LOOP AT igpitm .
MOVE-CORRESPONDING igpitm TO zcta_gpitm_new.
zcta_gpitm_new-gpnum = zcta_gphdr_new-gpnum.
zcta_gpitm_new-mjahr = sy-datum(4) .
But , if there are multiple records in internal table only the last record present in the internal table is creating in the ztable(dbtable).
But,it should create all records in ztable ?