Quantcast
Channel: SCN: Message List - Enterprise Asset Management (SAP EAM)
Viewing all articles
Browse latest Browse all 10043

Re: Malfunction Start Time in future

$
0
0

Hello Neal,

1. I would first look into the User Exit QQMA0025 (include ZXWOCU21), to find out whether some Date time defaulting code is written which is putting you in situation.

 

 

2. Unable to find such code, I'd introduce this code here in this include. This would default the Notification Creation Date and Time into the Malfunction Create Date and Time fields. (as per your requirement).

 

 

IF I_VIQMEL-QMART = 'M2'.                        E_VIQMEL-AUSVN = I_VIQMEL-QMDAT.   E_VIQMEL-AUZTV = I_VIQMEL-MZEIT.
 ENDIF.

 

 

3. To make these fields (Malfn Start Date & Time) mandatory, you can do it through customizing transaction OIAL (influencing Notification type M2), like this

OIAL.JPG

Mark the time field (VIQMLE-AUZTV) also Req as above.

 

Alternatively you can put the following code in the include ZXQQMU20 of user exit QQMA0014 which would prevent creation of Notification without these fields filled.

 

IF I_VIQMEL-QMART = 'M2' AND 
( I_VIQMEL-AUSVN IS INITIAL OR I_VIQMEL-AUZTV IS INITIAL) .   MESSAGE 'Please fill Malfunction Start Date and Time' TYPE 'I'.   RAISE EXIT_FROM_SAVE.
ENDIF.

 

Also you can opt for the following code lines in the same include (ZXQQMU20) to prevent the Malfunction date/time to be in future.

 

IF I_VIQMEL-QMART = 'M2' .    IF I_VIQMEL-AUSVN > SY-DATUM OR      ( I_VIQMEL-AUSVN = SY-DATUM AND I_VIQMEL-AUZTV > SY-UZEIT ).      MESSAGE 'Malfunction Date/Time can not be in future' TYPE 'I'.     RAISE EXIT_FROM_SAVE.   ENDIF.
 ENDIF.

 

 

And if you want to restrict the setting of NOCO (Notification Completed) status without the Mafunction end Date and Times then give the following code in the above include (ZXQQMU20).


IF I_VIQMEL-QMART = 'M2' AND I_VIQMEL-PHASE = '4'.
IF I_VIQMEL-AUSBS IS INITIAL or I_VIQMEL-AUZTB IS INITIAL.
 MESSAGE 'Please fill Malfn End Date & Time before completing the Notificn' TYPE 'I'.     RAISE EXIT_FROM_SAVE.   ENDIF.
 ENDIF.



 

Hope this helps, Best of luck

Jogeswara Rao K


Viewing all articles
Browse latest Browse all 10043

Trending Articles