‎2007 Jun 12 6:46 AM
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
‎2007 Jun 12 6:53 AM
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
‎2007 Jun 12 6:52 AM
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.
‎2007 Jun 12 6:53 AM
Hi
You mean to say loop i_vbap
and Read all tables and if sy-subrc = 0. then move to final internal tale.
‎2007 Jun 12 6:55 AM
‎2007 Jun 12 6:53 AM
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
‎2007 Jun 12 6:54 AM
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