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

Insert records into ztable

hi all,

I want to inserts records from itab to ztable...

i create a ztable and a report (both having same fields), they r working properly but now i want that records of report (coming after execution), transport into ztable...

For this, my coding is:

LOOP AT ITAB.

WA-VKBUR = ITAB-VKBUR .

WA-KUNNR = ITAB-KUNNR .

WA-NAME1 = ITAB-NAME1 .

WA-AUBEL = ITAB-AUBEL .

WA-ERDAT1 = ITAB-ERDAT1 .

WA-NETWR1 = ITAB-NETWR1 .

WA-VBELN = ITAB-VBELN .

WA-ERDAT = ITAB-ERDAT .

WA-NETWR = ITAB-NETWR .

WA-ZTERM = ITAB-ZTERM .

INSERT INTO ZCHEQUE VALUES WA.

CLEAR WA.

ENDLOOP.

after it, records r coming in ztable, but not enough.. means in report records r approx. 90+ and in ztable records transaport only 10....

howz its possible....

thanks & regards,

<b>Anil Kumar</b>

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 01, 2007 at 06:54 AM

    Hi Anil,

    It is possible because of the Table keys..

    if your internal table is having two records with same key value, then only the first record will be inserted..

    Thanks and Regards,

    Vikas Bittera.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 01, 2007 at 06:55 AM

    Anil,

    1. First delete all records from the table and then run you report for updation.

    or

    2. Instead of INSERT use MODIFY

    MODIFY TABLE ZTABLE FROM ITAB.

    COMMIT WORK.

    (There is not need for loop)

    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.