Application Development 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

Former Member
0 Kudos

Hi

Iam fetching data frm few tables and want to put into final table,but which is better peformance..

ex 1. iam getting data from vbak and vbap(join) into i_vbap

2. vbuk and vbkd(join) into i_vbuk where vbeln = i_vbap-vbeln.

3.select parnt from table into i_parnt where id1 = i_vbap-kunnr and wert1 =

i_vbuk-bzirk.

4.get field from ibin into i_ibin where field = i_vbap-cuobj.

wich is best to loop.

Any help is higly appreciated.

Thanks

1 ACCEPTED SOLUTION

0 Kudos

Hi,

I think first two steps are fine.

In the 3rd and 4th step you can use IN or FOR ALL ENTRIES to get the values you need not loop.

Regards,

Sesh

5 REPLIES 5

Former Member
0 Kudos

hi krk,

first loop on i_vbap itab,

then throug read u can move-corresponding fields to final internal table from the ramining itab's.

this is good method even for performance.

regards,

seshu.

0 Kudos

Hi

You mean to say loop i_vbap

and Read all tables and if sy-subrc = 0. then move to final internal tale.

0 Kudos

ya that's right.

proceed.

0 Kudos

Hi,

I think first two steps are fine.

In the 3rd and 4th step you can use IN or FOR ALL ENTRIES to get the values you need not loop.

Regards,

Sesh

Former Member
0 Kudos

Hi,

The best way is loop throgh the i_vbap and then use READ for other tables.

SORT all other tables before use so that you can use BINARY SEARCH.

Reward points if useful.

Regards,

Atish