Skip to Content
Author's profile photo K Jogeswara Rao

Mandatory Malfunction End Date/Time fields for NOCO

One of the very common requirements in SAP-PM while configuring the Notification Type ‘M2’ is that the ‘User should not be able to get the NOCO status to the Notification, until the Malfunction End Date and Time fields (AUSBS & AUZTB) are not filled’.  SAP standard, due to some reason did not provide this, but for all such requirements some or other tool has certainly been provided. The instrument to achieve the present task is User Exit IWOC0002.

Just put the following code in the include here namely ZXWOCU10.


IF I_VIQMEL-QMART = 'M2' .
 IF  I_VRGNG = 'PMM4' AND ( I_VIQMEL-AUSBS IS INITIAL OR I_VIQMEL-AUZTB IS INITIAL ).
 MESSAGE 'Fill The Malfunction End Date & Time before Completing the Notification' TYPE 'I'.
 RAISE NO_STATUS_CHANGE.
 ENDIF.
ENDIF.
















This code brings you the following pop-up and prevents from NOCO, when you click on the flag .1.JPG


__________________________________________________________________________________


Alternatively,

Alternatively we can achieve this, also through User Exit QQMA0014. For this, put the following code in the include here namely ZXQQMU20.

IF I_VIQMEL-QMART = 'M2'.
 IF E_VIQMEL-PHASE = '4' AND ( I_VIQMEL-AUSBS IS INITIAL OR I_VIQMEL-AUZTB IS INITIAL ).
 MESSAGE 'Filling Malfunction End Date/Time is mandatory for completing Notification' TYPE 'I'.
 RAISE EXIT_FROM_SAVE.
 ENDIF.
ENDIF. 

The difference in this case is, after clicking on  NOCO flag ,  the Reference Date/Time pop-up appears (see below).

Capture.JPG

When continued, the NOCO preventing pop-up (see below) appears  and user will not be able to complete the Notification.

Capture1.JPG

Note:

In both the codes, it is assumed that this requirement is for Notification type M2. So make changes in the first line of the codes accordingly as per the Notification type/s relevant to you.

Like another such common requirement by SAP-PM people which was discussed in this post, the present one is also found to be very frequently required. Hence this post. Hope members would find this too useful.

Thank you & Regards

Jogeswara Rao K

Assigned Tags

      5 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Keerthan Kumar
      Keerthan Kumar

      Sir , Its a very nice blog, thanks a lot for providing this.

      I have one doubt , Can you please explain" IF  I_VRGNG = 'PMM4' "

      Regards

      Keerthan Kumar

      Author's profile photo K Jogeswara Rao
      K Jogeswara Rao
      Blog Post Author

      This indicates the value of Business Transaction. See this

      TJ01.JPG

      Hope I need not explain what is I_VRGNG. It is one of the Import parameters to the Function-module of the user-exit.

      KJogeswaraRao

      Author's profile photo Keerthan Kumar
      Keerthan Kumar

      Thank you Sir.

      Author's profile photo Vishal Deshpande
      Vishal Deshpande

      Thanks Jogeswara for this useful info

      Author's profile photo Shubham Agrahari
      Shubham Agrahari

      Hello Sir, I am very thankful for this information. Sir could you also explain the use of RAISE EXIT_FROM_SAVE when i tried to look into exit from save it says Global Field EXIT_FROM_SAVE does not exist Do
      you want to create the object?