2006 Dec 18 7:18 AM
hi experts,
i have stored all the general material details in one internal table and description, valuation details of the meterial is stored in another internal table which is of standard table. now i need to tranfer all the data from these two internal tables into one final internal table but it is taking lot of time as it has to transfer lacs of data.
i have declared the output table as shown below
DATA:
t_output TYPE standard TABLE
OF type_output
INITIAL SIZE 0
WITH HEADER LINE.
(according to the standard i have to declare like this and the two internal tables are declared similar to the above one)
could somebody suggest me how shall I procced through this...
thanks in advance....
ragerds,
Deepu
hi experts,
i have stored all the general material details in one internal table and description, valuation details of the meterial is stored in another internal table which is of standard table. now i need to tranfer all the data from these two internal tables into one final internal table but it is taking lot of time as it has to transfer lacs of data.
i have declared the output table as shown below
DATA:
t_output TYPE standard TABLE
OF type_output
INITIAL SIZE 0
WITH HEADER LINE.
(according to the standard i have to declare like this and the two internal tables are declared similar to the above one)
could somebody suggest me how shall I procced through this...
thanks in advance....
ragerds,
Deepu
2006 Dec 18 7:32 AM
sort itab1 by matnr.
sort itab2 by matnr.
loop at itab1.
move itab1-field to itab3.
read table itab2 with key matnr = itab1-matnr binary search.
if sy-subrc = 0.
move: itab2-field to itab3.
endif.
append itab3.
endloop.
2006 Dec 18 7:45 AM
Hi Deepu ,
I think you have to loop on the internal tables and populate the third table , this is the only way which i can remember .
Regards
Arun
2006 Dec 19 3:25 PM
Have a look at the following article which you may find useful:
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40729734-3668-2910-deba-fa0e95e2c541">Improving performance in nested loops</a>
good luck, damian
2006 Dec 20 6:52 AM
hi damian,
very thankful to your response....
thanks & regards,
deepu
2006 Dec 20 12:14 PM
For nested loop there is a very good example in the "Environment->Performance example" menu item (the "Environment" menu is default in many transactions, e.g. SE38).
Go to this page (no TCode for it) and in the "Internal Tables" box look for the "Nested loops" example .
enjoy.
ayal.
2006 Dec 20 6:44 AM
performance issue is solved by sorting the table with key fields.
thanks
deepu.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |