Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

performance issue while transferring data from one itab to another itab

Former Member
0 Likes
773

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

6 REPLIES 6
Read only

Former Member
0 Likes
728

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.

Read only

Former Member
0 Likes
728

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

Read only

Former Member
0 Likes
728

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

Read only

0 Likes
728

hi damian,

very thankful to your response....

thanks & regards,

deepu

Read only

0 Likes
728

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.

Read only

Former Member
0 Likes
728

performance issue is solved by sorting the table with key fields.

thanks

deepu.