2009 Apr 08 6:27 AM
I have perform a select statement it takes a long time.
SELECT SINGLE * FROM afru
WHERE werks = i_aufm2-werks
and wablnr EQ i_aufm2-mblnr
and aufnr eq i_aufm2-aufnr
AND stokz = 'X'.is any way to select easily,
or on key field select from another table.
pl. help.
I have perform a select statement it takes a long time.
SELECT SINGLE * FROM afru
WHERE werks = i_aufm2-werks
and wablnr EQ i_aufm2-mblnr
and aufnr eq i_aufm2-aufnr
AND stokz = 'X'.is any way to select easily,
or on key field select from another table.
pl. help.
2009 Apr 08 7:11 AM
Helllo ,
whats the need of doing this step ?, based on the requirement we can suggest .
regards
Prabhu
2009 Apr 08 7:23 AM
Try to provide BUDAT in the WHERE condition.
2009 Apr 08 8:07 AM
Hi!
Try to create secondary index for fields in WHERE clause.
2009 Apr 08 8:10 AM
hey, i got the solution using below code,
thanks,
SELECT mblnr aufnr rspos menge werks aufpl aplzl
FROM aufm
INTO TABLE i_aufm2
WHERE matnr EQ matnr_261-matnr AND charg EQ matnr_261-charg AND bwart = '261'
AND mblnr > '4900000000'
AND mjahr >= '2008'.
sort i_aufm2 by werks mblnr aufnr.
LOOP AT i_aufm2.
select single * from afvc
where aufpl = i_aufm2-aufpl
and aplzl = i_aufm2-aplzl.
if sy-subrc = 0.
select single * from afru
where rueck = afvc-rueck
and rmzhl = afvc-rmzhl
and stokz = 'X'.