‎2007 Aug 02 10:02 PM
Hi Experts,
I am listing maintenance work orders, maintenance work centers ( arbpl or vaplz ) and process orders based on production work center ( arbpl ) and start dat.
First im trying to get objid from CRHD based on work center ( arbpl ) and then,
AUFPL OBJNR from AFVC based on arbid and then,
AUFNR VAPLZ from CAUFV based on aufpl and s_date.
these are the select statements for maintenance work orders.
SELECT objid
FROM crhd
INTO TABLE crhd_tab[]
WHERE arbpl IN s_arbpl.
SELECT aufpl objnr aplfl vornr INTO CORRESPONDING FIELDS OF TABLE lts_objnr[]
FROM afvc
FOR ALL ENTRIES IN crhd_tab[]
WHERE arbid = crhd_tab-objid.
SELECT gstrp aufnr vaplz ktext INTO TABLE it_tab1
FROM caufv
FOR ALL ENTRIES IN lts_objnr[]
WHERE aufpl = lts_objnr-aufpl
AND gstrp IN s_date.
also i wrote separate select statement for listing process orders.
SELECT agstrp aaufnr aernam carbpl
INTO TABLE it_tabp FROM caufv AS a
INNER JOIN afru AS b ON aaufnr = baufnr
INNER JOIN crhd AS c ON barbid = cobjid
WHERE
a~gstrp IN s_date
AND c~arbpl IN s_arbpl.
and im collecting both the orders in final internal tables.
when i enter only date in selection screen im getting both process orders and work orders, maintenance work centers.
But when i enter date and work center, its displaying only process orders.
I looked into the tables but unable to find the relation between maintenance work orders, maintenance work center and production work center.
‎2007 Aug 05 7:52 PM
Hi Experts,
Is there any table from which we can get work orders(aufnr) based on work center (arbpl ).