Skip to Content
author's profile photo Former Member
Former Member

inserting data in database table issue

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 13, 2008 at 06:13 PM

    HI,

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

    regards,

    Advait

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 13, 2008 at 06:11 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 13, 2008 at 06:12 PM

    Have you tried this insert statement

    Insert into dB values itab.

    thanks

    Shree.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 13, 2008 at 06:29 PM

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

    Rob

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 13, 2008 at 07:23 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.