‎2007 Dec 21 2:34 PM
Hi,
i have a doubt.. how can we send the data from internal table to databse table. pls, send me the reply ASAP...
Thanks & Regards,
sunil.
‎2007 Dec 21 2:37 PM
HI
we can send / fill the data base from internal table by using
INSERT COMMAND
COMMAND:
INSERT DATABSE TABLE FROM ITAB.
Thanks
Siva kumar
‎2007 Dec 21 2:38 PM
‎2007 Dec 21 2:38 PM
Check this sample code...
loop at it_record into wa_record.
zcusreq-updat = sy-datum.
zcusreq-kunnr = wa_record-kunnr.
zcusreq-matnr = wa_record-matnr.
zcusreq-reqwk = wa_record-reqwk.
zcusreq-menge = wa_record-menge.
zcusreq-recwk = wa_record-recwk.
insert zcusreq.
endloop.
‎2007 Dec 21 2:51 PM
Hi Sunil.
You can do this by two ways either using Insert statement or modify statement.
loop at itab into wa_itab.
*use this
in this case it will insert new record
INSERT INTO scarr VALUES wa_itab.
*or use this.
in this case it will first modify the record
*if it is exits otherwise insert a new entry
MODIFY INTO scarr VALUES wa_itab.
endloop.
Reward Points, if useful.
Regards,
Manoj Kumar
‎2007 Dec 21 2:54 PM
Hi,
If you want to add the data's from Internal table to Data Base table means you should use Insert Command.
Example.
Data : begin of wa,
name(10) type c,
age type I,
end of wa.
data : Itab like table of wa with header line.
Itab-name = 'abc'.
Itab-age = '25'.
insert into "dbname" from table Itab.
Thanks.