2006 Jul 05 6:57 PM
If I want to copy full contents of one internal table itab1 to another itab2, what is the best method?
I see,
Loop at itab1.
Append itab1 to itab2.
clear itab1.
endloop.
is ok. Is there any other simpler method using assigning etc?
Thanks.
2006 Jul 05 6:58 PM
If they are exactly the same structure.
itab2[] = itab1[].
Regards,
Rich heilman
2006 Jul 05 6:58 PM
2006 Jul 05 7:00 PM
Thanks.
I have a couple of internal tables which I need to copy all of them to one main itab.
So in that case, do I have to use 'loop'?
any other simpler method than that?
Thanks again.
Message was edited by: nuren hm
2006 Jul 05 7:02 PM
2006 Jul 05 7:02 PM
Hello nuren,
Loop at tab1.
move-corresponing tab1 to tabmain.
append tabmain.
ENDLOOP.
Make sure user small and big table have same fields name.
Thanks,
Amit
2006 Jul 05 7:07 PM
hi Nuren,
1. One way is
itab2[] = itab1[].
2. The other way is
Loop at itab1.
move-corresponding itab1 to itab2.
append itab2.
Endloop.Regards,
Santosh
2006 Jul 05 7:11 PM
2006 Jul 05 7:13 PM
hi nuren,
loop at it_final.
move-corresponding itab1 to it_final.
move-corresponding itab2 to it_final.
append it_final.
endloop.
regards,
keerthi.
2006 Jul 06 2:18 AM
Hi Rich,
Sorry for being late. Variety of reasons because sometimes I just wait for all my questions and I award points at the end of the day otherwise I tend to forget awarding for some questions. And sometimes very busy working on the tasks and sometimes I would n't be even starting the task related to the question (in this case, I may mistakenly award points to the solutions which may not be right and thus would be a problem for future browsers). So, normally I shall tend not to forget by the end of the day to award points..
But thanks for reminding me and trying to keeping this place professional. It is just due to one of you guys that these forums are runnning smoothly.
Regards,
Nuren
2006 Jul 06 2:33 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |