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

hi. inserting data into a table from internal table

Hi,

i am trying to mass update to the database table

from the internal table.

it is giving an error that the internal table is not long enough..

can anyone help.

ADVance Thanks & Regards

Guhapriyan Subrahmanyam

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

8 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 06, 2005 at 04:38 AM

    Hi,

    Check with this code......

    ****************

    data ITAB like standard table of TABLE with header line.

    After getting all you data into ITAB....

    loop at ITAB.

    update TABLE from ITAB.

    if sy-subrc eq 0.

    commit work.

    else.

    rollback work.

    endif.

    THANKS

    If this helps you reward with points and close the thread.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2005 at 11:18 AM

    Hi,

    Check whether the internal table is been declared as that of the database table,

    Hope this helps,

    Rgds,

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2005 at 11:25 AM

    Hi Subrahmanyam ,

    Assign the field symbol to internal table and then update the table .

    Ex:

    ASSIGN itab TO <F>. 
    UPDATE dbtab FROM TABLE <F>.

    <i>Reward Points If It Helps YOU.</i>

    Regards,

    Raghav

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2005 at 11:26 AM

    hi.

    thank you very much

    it is declared same as the database table

    but the table has an appended structure

    i dont know how to insert data in this table.

    thanks & regards

    Guhapriyan subrahmannyam

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2005 at 11:28 AM

    Hi,

    Probably you have missed out some fields while declaring your itab.

    Check it.

    <b>

    but the table has an appended structure

    i dont know how to insert data in this table</b>.

    For this you just insert those fields which are in appending structure to your itab then it should work.

    Hope this helps

    Reagrds

    Amit

    Message was edited by: Amit Kumar

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 06, 2005 at 03:00 AM

    If inserting new entries is what you are trying, try this:

    insert <dbtable> from itab.

    Also if you want to remove the previous entries do this first:

    delete from <dbtable>

    Message was edited by: Feroz Buksh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 06, 2005 at 04:04 AM

    Hi Subrahmanyam,

    First Declare the internal Table like below:

    Data: <Internal-table> type standard table of <database-table> with header line.

    Then use the below code to modify the Database table based on your conditions.

    modify <database-table> from table <internal-table>.

    I hope this help's you.

    Regards,

    Raja

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 08, 2005 at 07:07 AM

    thank you all for the valuable suggestions..

    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.