I want to fetch the delivery docs correponding to the billing docs
from table vbfa.
code IS LIKE THIS :
t_bill_list table contains the invoice nos.
code 1)
select distinct
vbelv
vbeln
into table t_bill_del_data
from vbfa
for all entries in t_bill_list
where vbeln eq t_bill_list-vbeln
and vbtyp_v = 'J'
and vbtyp_n = 'M'
the above query was taking time so i changed that to -->
code 2)
loop at t_bill_list into wa_bill_list.
select single
vbelv
vbeln
into wa_bill_del_data
from vbfa
where vbeln eq wa_bill_list-vbeln
and vbtyp_v = 'J'
and vbtyp_n = 'M'.
if sy-subrc = 0.
append wa_bill_del_data to t_bill_del_data.
clear wa_bill_del_data.
endif.
endloop.
both the queries have poor performance in quality system because of large amount of data
Is there any other table other than vbfa?
Or how should i fetch the records?
rgds,
Madhuri