2006 Dec 14 10:33 AM
Hallow I build a stable in se11 and I wont write to it data from my itab how can I do that. I check in my debugger and itab is full with data how can I write it to my table becouse my insert dont do it .(my table is like itab).thankes.
*--
LOOP AT itab1.
SPLIT itab1 AT ',' INTO:
itab-id_number
itab-pernr
itab-hagbla
itab-date_open_hagbla
itab-date_start_hagbl
itab-date_stop_hagbla
itab-date_open_hamora
itab-date_close_hamor.
APPEND itab.
ENDLOOP.
<b>LOOP AT itab.
INSERT yhr_ex_mushlach FROM itab.
ENDLOOP.</b>
Hallow I build a stable in se11 and I wont write to it data from my itab how can I do that. I check in my debugger and itab is full with data how can I write it to my table becouse my insert dont do it .(my table is like itab).thankes.
*--
LOOP AT itab1.
SPLIT itab1 AT ',' INTO:
itab-id_number
itab-pernr
itab-hagbla
itab-date_open_hagbla
itab-date_start_hagbl
itab-date_stop_hagbla
itab-date_open_hamora
itab-date_close_hamor.
APPEND itab.
ENDLOOP.
<b>LOOP AT itab.
INSERT yhr_ex_mushlach FROM itab.
ENDLOOP.</b>
2006 Dec 14 10:36 AM
Hi ,
Insert <Table name> from <b>Table</b> ITAB .
Regards ,
Senthil
2006 Dec 14 10:42 AM
Hi
Try the below code.
tables lfa1.
data it_lfa1 like lfa1 occurs 0 with header line.
it_lfa1-lifnr = '90'.
it_lfa1-land1 = 'AU'.
it_lfa1-name1 = 'aaa'.
append it_lfa1.
it_lfa1-lifnr = '91'.
it_lfa1-land1 = 'IN'.
it_lfa1-name1 = 'bbb'.
append it_lfa1.
it_lfa1-lifnr = '92'.
it_lfa1-land1 = 'DE'.
it_lfa1-name1 = 'ccc'.
append it_lfa1.
loop at it_lfa1.
insert lfa1 from it_lfa1.
endloop.
if sy-subrc = 0.
write:/ 'Inserted'.
else.
write:/ 'Not'.
endif.
it is inserting records into database table.
Regards
Haritha.
Message was edited by:
Haritha
2006 Dec 14 10:44 AM
Hello Antonio,
if value index of yhr_ex_mushlach is the same of value of t_itab
insert
don´t work. You must usemodify
: If register exist modify if not insert.Also you may probe after insert or modify the sy-subrc
Regards...
An doubt You came from Israel but your name came from Spain.
2006 Dec 14 10:49 AM
2006 Dec 14 10:58 AM
Hi antonio,
Try this code .
loop at itab1 into wtab .
update yhr_ex_mushlach from wtab .
endloop.
Hope this helps you .
With regards ,
Thasneem.
2006 Dec 14 11:00 AM
Hi Antonio,
Add the keyword 'TABLE' in this statement:
INSERT yhr_ex_mushlach FROM TABLE itab.
Regards,
Hendy
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |