05-27-2009 1:53 PM
Hi Experts,
How to improve the performance of below query.
SELECT lips~charg lips~vbeln INTO TABLE ilips FROM lips
INNER JOIN vbuk
ON vbuk~vbeln = lips~vbeln
WHERE lips~matnr IN s_matnr
AND lips~werks = p_werks
AND lips~lgort IN r_sloc
AND lips~lfimg NE 0
AND vbuk~wbstk IN ('A','B') . "Total goods movement status
is there any proper way to selecting data??
05-27-2009 2:09 PM
try using the PKey fields, VBELN, POSNR in the where condition of the select statement.
Check for any relavent indexes in these tables.
Also create a range for the last wbstk field and populate it with the values A and B.
This should help you.
Regards,
S.Dakshna Nagaratnam.
05-27-2009 2:10 PM
Hi.
If you are looking for deliveries not yet issued, check if VETVG and VEPVG suit your needs.
Otherwise, if you have the material, you could start by the sales order and use VAPMA.
Regards,
Rui Dantas
05-27-2009 2:30 PM
You are SELECTing based on LIPS-MATNR. There is an index on MATNR in LIPS, but in our system it has not been created in the database. Check to see if it is created in your system.
If not, you may be able to work table VAPMA into the SELECT or some other secondary index table.
Rob
05-27-2009 3:48 PM
VLPMA is probably the better choice, this has delivery items by material. Helpful only if S_MATNR is not typically empty, but filled with a rather narrow range of material numbers.
Thomas
07-27-2009 8:11 AM
07-27-2009 9:28 AM
>
> no reply a long time
Hi NSTomar.
What do you mean by "no reply"? You made the question, received several answers, and then you provided no more feedback.
Have you tried any of the suggestions (namely VLPMA, suggested by Thomas) ? What were the results?
Rui Dantas