Skip to Content

Insert Records into database table.

Hello Friends,

I am trying to insert set of records from an Internal table into Database table.

INSERT SPFLI FROM TABLE ITAB ACCEPTING DUPLICATE KEYS.

This is my statement. But It inserts only one record in to SPFLI table.

Cheers

Senthil

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Mar 24, 2008 at 10:11 AM

    hi,

    Plz check ur internal table whether it contains any values..

    After tht if it is ok,u ca insert using

    Insert <db> from table <internal table>

    Reward if useful

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 24, 2008 at 10:12 AM

    Hi Sentil,

    USE THIS STATEMENT.

    MOVE-CORRESPONDING ITAB TO SPFLI.

    SPFLI-MANDT = SY-MANDT.

    MODIFY SPFLI.

    thy this....

    <b>reward if useful</b>

    regards,

    sunil kairam.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 24, 2008 at 10:15 AM

    Hi,

    Try this.

    SORT itab.

    DELETE ADJACENT DUPLICATES FROM itab COMPARING PRIMARY_KEY.

    INSERT SPFLI FROM TABLE ITAB .

    Reward if helpful.

    Regards,

    Ramya

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 24, 2008 at 10:15 AM

    Hi,

    you can not insert duplicate entries into database table...check for the key set...

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 24, 2008 at 10:16 AM

    Hi

    Dont update SAP tables directly

    it is not recommended

    make use of BAPI or BDC to update

    Z table can be modified using the insert or modify or update

    Regards

    Shiva

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 24, 2008 at 10:26 AM

    hi,

    check for ur primary keys it will not allow any dublicate values...so if you entries are dublicate so it ll not allow to insert any dublicate values in database table....

    <b>reward if useful</b>

    regards,

    sunil kairam.

    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.