12-22-2008 3:35 PM
Hi Experts,
Currently, if the user do not enters any value in QUANTITY field, while creating a sales order(or even VA02 too) ..........we are getting a Warning message(VU001).
So, I need to change it to hard error message type, am changing the message type, but, its not reflecting, and still its throwing a warning message(VU001)!!
Let me know that, What is the correct user exit to incorporate my changes?
From where this message generating? am keeping a watch point with this message (VU001), but, its not stopping!!
System is ECC 6.0
repliaes appreciated
thanq
Edited by: SAP ABAPer on Dec 22, 2008 4:38 PM
12-22-2008 4:02 PM
Fire a message from Exit MV45AFZZ in Perform USEREXIT_SAVE_DOCUMENT_PREPARE
by adding only one line of Code your purpose should be solved.
IF sy-tcode = 'VA01' OR sy-tcode = 'VA02'.
IF xvbap-netwr = '0'.
MESSAGE e001(ZSD)."this is my Custom message class where i add the messages
ENDIF.
ENDIF.
12-22-2008 4:02 PM
Fire a message from Exit MV45AFZZ in Perform USEREXIT_SAVE_DOCUMENT_PREPARE
by adding only one line of Code your purpose should be solved.
IF sy-tcode = 'VA01' OR sy-tcode = 'VA02'.
IF xvbap-netwr = '0'.
MESSAGE e001(ZSD)."this is my Custom message class where i add the messages
ENDIF.
ENDIF.
12-22-2008 5:43 PM
thanq
(the reason, why my original code was worked is that, I put my code in SAVE user exit!!)
yes, its working, but, the scaenrio is different, so, its like,
if the user entered my_matnr with quantity = 0,
then presses ENTER,
now, we are getting a WARNING MESSAGE of message class & # is VU001, saying the Item 000010 is quantity 0...........so, here I need to change it to HARD ERROR message.
So, as soon as press the ENTER button(after enetring 0 qty matnr)........I need to get HARD error message, so, where should I incorporate the changes? is it MOVE FIELD TO VBAP user exit?
thanq
12-22-2008 5:56 PM
By adding the code(Which i suggested above) in USEREXIT_SAVE_DOCUMENT_PREPARE
MESSAGE e001(ZSD)."this is Custom message which
"would come from your message class(ZSD in my case)
What do you mean by HARD message?is it some kind of custom message?
12-22-2008 6:18 PM
thanq
yes, i understood ur answers, but, actually, i did not explained in detail about my requiremnt, in my thread, its goes like,
User starts VA01 or VA02,
then...enters my_matnr and supplies the quantity as 0
then user presses the ENTER button, now,
(currently) here we are getting a warning message, saying the item does hv zero qty, so user can proceed futher,
so, here at this point, I need to change this message type from warning to Error type, so, immmediately here itself, the user would be stopped to proceed further.
Now, hope my requirement is clear.
thanq
12-22-2008 6:48 PM
Try putting your logic in USEREXIT_CHECK_VBAP.
Also make sure you check for T180-TRTYP = 'H' (Create mode) or T180-TRTYP = 'V' (Change mode). You don't want errors when user hits enter on a display transaction and quantity = 0
Edited by: Ken Sanghvi on Dec 22, 2008 1:49 PM
12-22-2008 4:03 PM
Hi,
u write your checking code in MV45AFZZ enhancement point user exit USEREXIT_SAVE_DOCUMENT_PREPARE.
Regards
Tarapada D.