cancel
Showing results for 
Search instead for 
Did you mean: 

Maintenance order

mahesh_sappm
Participant
0 Kudos

pl give me suggition for the scenario

i want to make a setting on  maintenance order,system should not allow to create the mainteanance oreder for (breakdown and mainteanance request) until unless previous order status  be in TECHO which is created on same equipment.

ex:one equipment is under breakdown or under maintenance,so system should not allow to create another maintenance order on the same equipment.

Accepted Solutions (0)

Answers (1)

Answers (1)

jogeswararao_kavala
Active Contributor
0 Kudos

Possible through User-Exit IWO10009. As per this the Creating of such Order is prevented when you press Save button while creating, and gives you relevant error message such as 'One or more Orders are open on this Equipment, Create fresh Order not possible'.

KJogeswaraRao

mahesh_sappm
Participant
0 Kudos

thanks for ur replay but where i have to congigure the user exit.and procedure for the settings pls

jogeswararao_kavala
Active Contributor
0 Kudos

Try the following code in the include ZXWOCU07  of user-Exit IWO10009.  (You will arrive here through Tcode SMOD. Take help of your ABAP friend).

IF SY-TCODE = 'IW31'.
   DATA: V_AUFNR TYPE AUFNR.
   CLEAR: V_AUFNR.

   SELECT SINGLE AUFNR FROM VIAUFKS
     INTO V_AUFNR WHERE  ( IPHAS = '0' OR IPHAS = '2' )
     AND EQUNR = CAUFVD_IMP-EQUNR
     AND  ( AUART = 'ZM02' OR AUART = 'ZM03' ).

   IF V_AUFNR IS NOT INITIAL AND
     ( CAUFVD_IMP-AUART = 'ZM02' OR CAUFVD_IMP-AUART  = 'ZM03' ).
     MESSAGE 'One or more Orders are open on this Equipment'
     TYPE 'E' DISPLAY LIKE 'I '.
   ENDIF.

ENDIF.


After implementing this code you would get the following error

when you try to create (IW31) a ZM02 or ZM03 types Orders (you change these order types in code as per yours), if already any Order of these types is pending  (CRTD or REL status) on this particular Equipment.

This code may have issues. Test well with the help of your ABAPer in DEV220 or DEV100 for all combinations of creating Orders. You need to test well for any undesirable creation of Orders and undesirable trigger of this error pop-up. You have to work alongwith your ABAPer and confirm that code is functioning well.

Best of luck

KJogeswaraRao