Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

send the data from internal table to database table

Former Member
0 Likes
1,167

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.

5 REPLIES 5
Read only

Former Member
0 Likes
726

HI

we can send / fill the data base from internal table by using

INSERT COMMAND

COMMAND:

INSERT DATABSE TABLE FROM ITAB.

Thanks

Siva kumar

Read only

Former Member
0 Likes
726

modify z_db_table from table my_local_int_tab.

Read only

Former Member
0 Likes
726

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.

Read only

former_member402443
Contributor
0 Likes
726

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

Read only

Former Member
0 Likes
726

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.