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

Read

Former Member
0 Likes
673

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
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
645

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
Read only

Former Member
0 Likes
645

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.

Read only

0 Likes
645

Hi

You mean to say loop i_vbap

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

Read only

0 Likes
645

ya that's right.

proceed.

Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
646

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

Read only

Former Member
0 Likes
645

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