Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3019

Re: Prevent to close notification IW21 if the order IW31 is not closed

$
0
0

It is assumed that you are talking about Notifications with assigned Order. You have given a good title to your discussion. Still better title could be : 'Prevent NOCO from IW22 for Notifications with an assigned Order'.

 

Now the solution:

You can do it through user-exit QQMA0014. Put the following code in the include ZXQQMU20 of the exit and the job done.

IF i_viqmel-phase = '4'.
   DATA: v_phas TYPE pm_phase.
   CLEAR v_phas.
   SELECT SINGLE iphas FROM afih INTO v_phas WHERE aufnr = i_viqmel-aufnr.
   IF v_phas <> '3' .
     MESSAGE: 'Notification can not be completed until Order gets TECO' TYPE 'E' DISPLAY LIKE 'I'.
   ENDIF.
ENDIF
.

If an Order is aaisgned to a Notification and when you try to complete such Notification from IW22 then you get this error pop-up.

Capture.JPG

 

You know well that when such Order gets TECO (from IW32) this notification also gets NOCO simultaneously. So you can modify above message in the code such as:: 'Notification can be completed from Order TECO only'. I had such requirements and I have this code in use. It's a 2min job for your ABAPer.

 

 

Good luck

KJogeswaraRao


Viewing all articles
Browse latest Browse all 3019

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>