Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

ST05 query performans

Hi,


When i traced the coding below, i am waiting too much.. How can i write this join ? Can you help me ?


BR



SELECT SINGLE b~psmng FROM resb AS a

           INNER JOIN afpo AS b ON a~aufnr = b~aufnr

           INTO gt_data-stoktanuretim

           WHERE a~werks EQ p_werks

             AND a~matnr EQ gt_data-matnr

             AND a~aufnr NE space

             AND a~kdauf EQ gt_data-kdauf

             AND a~kdpos EQ gt_data-kdpos.

Former Member
replied

What are you trying to extract, you seem to already have SO, so a simple

select SINGLE psmng
     FROM AFPO
     WHERE kdauf EQ gt_data-kdauf
       AND kdpos EQ gt_data-kdpos.

Could suffice?


Regards,

Raymond

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question