Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

LIPS - VBUK QUERY PERFORMANCE

Former Member
0 Kudos

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??

6 REPLIES 6

Former Member
0 Kudos

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.

former_member182566
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

ThomasZloch
Active Contributor
0 Kudos

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

Former Member
0 Kudos

no reply a long time

0 Kudos

>

> 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