on 02-28-2008 10:21 AM
Hi All,
I had to improve the performance of one code i.e.
SELECT vbeln posnr
FROM lips
INTO TABLE t_lines
WHERE vbeln = i_delivery
AND posnr = i_delivery_line
AND kcmeng = 0.
OR vbeln = i_delivery
AND uecha = i_delivery_line
AND kcmeng = 0 .
can any please suggest me the best possible way to write the code .
the Position of fields in Table lips are
vbeln
posnr
kcmeng
uecha.
thanks
himanshu
Hi Himanshu,
Either use the key fields of the table for fetching the data or if you have the values of the index fields then use them in your where condition. You can see the index fields by clicking on the indexes tab which is present in se11.
Regards,
Priyanka.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
correct one is
select vbeln posnr
from lips
into corresponding fields of table t_lines
where vbeln = i_delivery and
(posnr = i_delivery_line or
uecha = i_delivery_line) and
kcmeng = 0.
Thanks
Aditya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
SELECT vbeln posnr
FROM lips
INTO TABLE t_lines
WHERE vbeln = i_delivery
AND posnr = i_delivery_line
AND kcmeng = 0.
as you are using Key fields in where condition, the above code will give you very good result.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.