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

Dump in insert statement

Former Member
0 Likes
578

<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.

4 REPLIES 4
Read only

Former Member
0 Likes
465

What does the DUMP gives as the error.

Regards,

Ravi

Read only

0 Likes
465

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.

Read only

Former Member
0 Likes
465

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

Read only

muhammed_nishad
Participant
0 Likes
465

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 .