‎2006 Jul 16 9:55 AM
<b>INSERT ZTABLE FROM TABLE FINAL</b>.
<b>ZTABLE</b> CONTAINS 9 ENTRIES.
<b>FINAL</b>- INTERNAL TABLE CONTAINS ONLY THE KEY ENTRIES.
I have populated only the key entries (5 entries) in the internal table, I dont want rest of the four entries to get inserted into the ZTABLE.
Thanks in advance,
Vivenchandar R.
‎2006 Jul 16 10:06 AM
‎2006 Jul 16 10:45 AM
If you want to modify the non key feilds of the table please use the update statement.
If you only wish to enter new records in the transparent table use Insert statement.
Simple but performance inefficient way is to use a modify statement. It will insert new records and update existing records.
‎2006 Jul 16 10:55 AM
Hi
Check if there you are trying to create a duplicate record with the same key.
Also, check if the field formats are the same.
Regards,
Sandeep
‎2006 Jul 17 4:49 AM
hai,
I suppose your internal table has more than one record with the same key,in such case you could use "accepting duplicate keys".
what it does is ,it will insert the vaild entry with the key for the first time,if your internal tavble contains more than one record with the same key ,it will ignore.
START-OF-SELECTION.
wa_test-fileno = '3334'.
wa_test-status ='X'.
***
***
APPEND wa_test TO it_test.
***
***
INSERT z01test1 FROM TABLE it_test ACCEPTING DUPLICATE KEYS.
***
IF sy-subrc <> 0.
MESSAGE 'not insterted' TYPE 'I'.
ELSE.
INSERT z01test1 FROM TABLE it_test ACCEPTING DUPLICATE KEYS.
IF sy-subrc <> 0.
MESSAGE 'not insterted2' TYPE 'I'.
ELSE.
MESSAGE 'insterted2' TYPE 'I'.
ENDIF.
try wiht this , hope this will help you
thank you .