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

Update problem

Hi guys,

I am trying to do a mass update on database table from an internal table. the syntax i have used is......

update db_tab from table it_tab.

The problem is it is just updating the 1st row of the database table whereas in the internal table there are 100 entries.

Do help me out on this.

Thanks and regards,

frank.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Posted on Nov 22, 2007 at 09:58 AM

    Hi,

    check that both the database table and the internal are of same structure...

    also use commit work after the update statement.

    Regards,

    Nagaraj

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2007 at 10:01 AM

    both structure should be same. primary key should be specified.

    enquee

    update dbname TABLE itab.

    commit work.

    dequee

    null

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2007 at 10:03 AM

    1) Check if the type and values of key fields in the DBTAB and ITAB are same.

    2) Use Modify instead of update.

    3) If the table is client dependant use client specified.

    Hope it helps.

    Lokesh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2007 at 10:05 AM

    hi,

    check weather u are using work area for inserting record into dbtab if u are working with work area and not in loof of itab then it will update only one record in data base check it out.

    Regards

    Gagan

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2007 at 10:17 AM

    <b>The statement to Insert Records from ITAB to DBtable is

    INSERT <DBTABLE> FROM TABLE <ITAB> ACCEPTING DUPLICATE ROWS.

    The statement to Insert single Record from WA to DBtable is

    INSERT <DBTABLE> FROM <wa> .

    Check out which of these is two is correct for ur scenario.

    And also check the content of the ITAB or Wa in the debugging</b>

    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.