on 09-30-2014 7:23 AM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
86 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.