Skip to Content
0
Former Member
Dec 10, 2008 at 01:21 AM

ztable to accept multiple records

17 Views

Hi,

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) .

MODIFY zcta_gpitm_new.

ENDLOOP .

COMMIT WORK.

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 ?

Regards,

Pradeep