‎2007 Sep 16 10:42 AM
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
‎2007 Sep 16 10:52 AM
if not t_bill_list[] is initial.
sort t_bill_list by vbeln.
select 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_n = 'M'
and vbtyp_v = 'J'.
endif.
‎2007 Sep 17 3:45 AM
Hi Prashant,
Thanks for help.
My problem got solved. i am fetching the records from the vbrp table instead of vbfa table.
the notes I referred are :191492,187906,185530.
basically, the query which i have written was giving 100% good performance in development server becoz the data was less. but was not at all running in Quality becoz of the large amount of data.so i used the table vbrp where i can get the invoice and delivery no link.
rgds
Madhuri
‎2007 Sep 17 3:46 AM
Thanks for help.
My problem got solved. i am fetching the records from the vbrp table instead of vbfa table.
the notes I referred are :191492,187906,185530.
basically, the query which i have written was giving 100% good performance in development server becoz the data was less. but was not at all running in Quality becoz of the large amount of data.so i used the table vbrp where i can get the invoice and delivery no link.
rgds
Madhuri