‎2007 Aug 27 1:54 PM
hallow
what isthe best way to insert the data from itab to database table with same structre.
Regards
‎2007 Aug 27 1:56 PM
‎2007 Aug 27 1:55 PM
‎2007 Aug 27 1:57 PM
hi Prabhu Peram
i try with
loop at itab.
insert zdatatab
endloop.
but its not working?
Regards
‎2007 Aug 27 1:56 PM
‎2007 Aug 27 1:58 PM
Hi,
Use Modify it is the best one insted of using INSERT or UPDATE.
MODIFY will do both the functions of INSERT and UPDATE.
<b>Reward if helpful.</b>
‎2007 Aug 27 1:59 PM
Hi,
Change the code
loop at itab.
insert into zdatatab values itab.
endloop.
<b>Reward if helpful.</b>
‎2007 Aug 27 1:58 PM
Hi Antonio,
Make use of the following statement in a similar way as shown below,
INSERT <DATABASE TABLE NAME> FROM TABLE <INTERNAL TABLE>.
<b>Note that the internal table has the same structure as the database table.</b>
<b>No need of looping at the internal table.</b>
<b>Reward points if this helps,</b>
Kiran
‎2007 Aug 27 2:04 PM
hi kiran
i try like that but i have eroorr
INSERT ZINTAB_A1 FROM TABLE intab_a1.
The work area "INTAB_A132" is not long enough. long enough.
but intab its not work area.
DATA : intab_a1 TYPE TABLE OF t_a1 WITH HEADER LINE .
TYPES: BEGIN OF t_konp,
knumh LIKE konp-knumh,
kstbm LIKE konp-kstbm,
kbetr LIKE konp-kbetr,
konwa TYPE konp-konwa,
END OF t_konp.
Regards
‎2007 Aug 27 1:59 PM
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/c4/93d942f7ca45b69dfdfd424c38332e/content.htm">refer this link</a>
regards,
srinivas
<b>*reward for useful answers*</b>
‎2007 Aug 27 2:13 PM
hi
good
ATA: WA_ZSAMPTAB1 TYPE ZSAMPTAB1.
DATA: T_DATA TYPE STANDARD TABLE OF ZSAMPTAB1.
WA_ZSAMPTAB1-CUSTNO = 'TEST'.
WA_ZSAMPTAB1-CUSTNAME = 'TEST CUSTOMER'.
WA_ZSAMPTAB1-CUSTADD = '44 TEST'.
APPEND WA_ZSAMPTAB1 TO T_DATA.
WA_ZSAMPTAB1-CUSTNO = 'TEST2'.
WA_ZSAMPTAB1-CUSTNAME = 'TEST CUSTOMER 2'.
WA_ZSAMPTAB1-CUSTADD = '44 TEST 2'.
APPEND WA_ZSAMPTAB1 TO T_DATA.
INsert the records.
INSERT ZSAMPTAB1 FROM TABLE T_DATA.
Commit.
COMMIT WORK.
thanks
mrutyun^
‎2007 Aug 27 3:00 PM
hi Mrutyunjaya Tripathy
itry like u tell but i always get i database table first line empty end the second line data but just one row way?
i also try like below and i have the same results
i declare the table like
data calss APPL0
size 1
dlivery class A
LOOP AT intab_a13 INTO wa_intab_a13.
INSERT zintab_a13 FROM wa_intab_a13.
COMMIT WORK.
.
ENDLOOP.
Regards
‎2007 Aug 28 12:23 PM
Hi..
DATA : ITAB TYPE STANDARD TABLE OF ZMATL
INITIAL SIZE 0 WITH HEADER LINE.
INSERT ZMATL FROM TABLE ITAB.
Regards,
Lakshmiraj
Reward points if helpful