cancel
Showing results for 
Search instead for 
Did you mean: 

SAP ABAP

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

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.