Skip to Content
0
Former Member
Oct 24, 2005 at 04:46 AM

Production Order and Sale Order...

31 Views

I have the folowing query to get the Production order qty. against the sale order and item, but this query makes my report very slow, is there any othe table from where i can get the sale order and production order join..

LOOP AT i_data.
     SELECT sum( b~psmng ) INTO i_data-psmng
        FROM aufk AS a
        INNER JOIN afpo AS b ON
         a~aufnr  = b~aufnr
        WHERE
         a~kdauf  = i_data-vbeln  AND
         a~kdpos  = i_data-posnr  AND
         b~matnr  = i_data-matnr.
modify i_data.
endloop.

abhishek