‎2007 Jul 25 10:54 PM
Hi,
In my selection screen i have work center (ARBPL) and start date.
I want to list work orders (AUFNR) based on technical object (tidnr) .
SELECT agstrp agsuzp baufnr cvornr darbpl bktext b~autyp INTO TABLE it_tab
FROM afko AS a
INNER JOIN aufk AS b ON aaufnr = baufnr
INNER JOIN afru AS c ON aaufnr = caufnr
INNER JOIN MCAFVGV AS D ON AAUFNR = DAUFNR
WHERE
a~gstrp IN s_date
AND d~arbpl IN S_ARBPL.
The above select statement is displaying Process Orders ( autyp = '40')
but i want to list work orders also ( autyp = '30').
I would appreciate if anyone can drive me on this.
‎2007 Jul 26 5:05 AM
First of all avoid using so many inner joins.
SELECT
agstrp agsuzp baufnr bktext b~autyp
INTO corresponding fields of table it_tab
FROM afko AS a
INNER JOIN aufk AS b ON aaufnr = baufnr
WHERE a~gstrp IN s_date.
loop at it_tab.
select single vornr from afru into it_tab-vornr where aufnr = it_tab-aufnr.
select single arbpl from MCAFVGV into it_tab-arbpl where aufnr = it_tab-aufnr.
MODIFY itab.
ENDLOOP.
hope this is helpful to u.
anju
‎2007 Jul 26 5:05 AM
First of all avoid using so many inner joins.
SELECT
agstrp agsuzp baufnr bktext b~autyp
INTO corresponding fields of table it_tab
FROM afko AS a
INNER JOIN aufk AS b ON aaufnr = baufnr
WHERE a~gstrp IN s_date.
loop at it_tab.
select single vornr from afru into it_tab-vornr where aufnr = it_tab-aufnr.
select single arbpl from MCAFVGV into it_tab-arbpl where aufnr = it_tab-aufnr.
MODIFY itab.
ENDLOOP.
hope this is helpful to u.
anju
‎2007 Jul 26 5:32 AM
hi
good
you can give the condition in where statement to display the data for autyp=40.
thanks
mrutyun^