Application Development 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: 

inserting data in database table issue

Former Member
0 Kudos

Hi,

I am trying to insert data from an internal table to a custom database table. Internal table got 53 entries and i can insert only one record. Now sure why ?

I am using insert db from itab accepting duplicate keys and failed.

I also tried Modify statement and still it is inserting single record only. But sy-dbcnt is 53 here and sy-subrc is 0 here, i am not sure why records are not inserted in internal table.

Note: I have only MANDT (client) as unique key in my DB table. Not sure if this have any impact.

Also, I have observed that during MODIFY statement, record inserted in from HEADER data record of internal table and when I use statement INSERT i see 1st record from internal table inserted into DB table.

Cheers...

1 ACCEPTED SOLUTION

Former Member
0 Kudos

HI,

If it is not absolutely necessary, try to make some more fields as key fields.

regards,

Advait

5 REPLIES 5

former_member598013
Active Contributor
0 Kudos

Hi Sudhakar,

I have also faced the same set of issue in one of my object, But I don't know the exact reason. Sometimes SAP Behaves differently... If you execute the same set of code after 2-3 days it will run but I really dont know the reason behind this.

Thanks,

Chidanand

former_member487858
Active Participant
0 Kudos

Have you tried this insert statement

Insert into dB values itab.

thanks

Shree.

Former Member
0 Kudos

HI,

If it is not absolutely necessary, try to make some more fields as key fields.

regards,

Advait

Former Member
0 Kudos

This same question was asked and answered recently. Please search the forum before asking.

Rob

Former Member
0 Kudos

Advaith,

Thanks for your response. After i increase key fields, my issue is resolved.

I have awarded you points.

Thank you very much for others for your response.