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