Skip to Content

Appending to 2nd itab.

dear frnds,

I have an itab1 with records in it. i want to transfer all the records of itab1 to itab2. then the itab1 is refreshed and it gets second set of records. i want to append this to itab2 again.

any neat and optimal soln. for this ?

regrds madan.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 30, 2005 at 03:36 PM

    Hi Madan

    append lines of ITAB1 TO ITAB2.

    REFRESH ITAB1.

    --->FILL ITAB1

    append lines of ITAB1 TO ITAB2.

    REFRESH ITAB1.

    Max

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 30, 2005 at 03:43 PM

    Hi,

    I believe itab1 and itab2 have the same structure in

    your case.

    First time just write

    <b>itab2[] = itab1[].</b>

    This will copy the entire contents from itab2 to itab1.

    Then in the second time write

    <b> Append lines of itab1 to itab2</b>

    <b>OR</b> <b>

    DATA : wa_itab1 like line of itab1.

    LOOP AT itab1 into wa_itab1

    append wa_itab1 to itab2.

    clear wa_itab1.

    ENDLOOP.</b>

    Note : Place the above code whereever you want to append from itab1 to itab2.

    This will solve your problem.

    Please reward points if this explanation is useful.

    Regards,

    Siva

    Message was edited by: Sivakumar Muthusamy

    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.