12-22-2008 2:52 PM
Hii All,
I got a problem when i am writing enhancement spot in MV45AFZZ.
I have added some new fields in 8459 sub-screen at item level in VA01 transaction
some of those fields are mandatory for some materials
Now if the user goes for a save with out entering those fields in addtional tab B, i am rising a error that field is not entered in Additional tab B.
Now everything is fine i am able to trigger that error message by writing the error message in USEREXIT_SAVE_DOCUMENT. By writing a enhancement spot.
whenever i trigger this error message if i go and enter the corresponding fields in Additional tab B at item level it is saying that the " Item SOME NO say 00010 does not exist " and it is going out of the transaction with out saving the sales order .
If i dont click the save button and going directly to that additional data tab and entering the corresponding field and going for save it is saving.
I am getting the problem if i click the save button before entering those fields. wht could be the problem?
please help me.
Thanks ,
Ravindra.
12-22-2008 3:26 PM
12-22-2008 3:33 PM
Can you please try to use anyother exit other than Save_Document. It may be a cause.
If not for once change the error message to 'I' or 'W' and check.
12-22-2008 3:39 PM
hi,
u write your error message checking code in USEREXIT_SAVE_DOCUMENT_PREPARE .
I think your problem will be solve.
regards
Tarapada. D
12-23-2008 4:44 AM
Hii,
@ Ankesh Saharan :
If i change the error message to information or warning it will go for a save even though those mandatory fields are missing.
@ TARAPADA DAN :
I tried using the exit USEREXIT_SAVE_DOCUMENT_PREPARE.
But the problem is based on the material number entered in the screen i am fetching part location type from MVKE. using that part location i am triggering error messages.
when i try to refer the material number as VBAP-MATNR it is blank in the exit USEREXIT_SAVE_DOCUMENT_PREPARE. So i cant use this exit.
any one please answer my question
Thanks,
Ravindra.
12-23-2008 4:54 AM
Hi Ravindra,
All the contents of VBAK and VBAP are available in internal table XVBAK and XVBAP respectively for MV45afzz...now read the internal table XVBAP as per requirement and see if you can find XVBAP-MATNR .....if it is entered on the screen..it will not be blank in XVBAP
Hope it helps
Regards
Byju
12-23-2008 4:59 AM
Hi,
As pointed out previously use FORM USEREXIT_SAVE_DOCUMENT_PREPARE for the error message. all 'VBAP' details are available in XVBAP including MATNR which can be used for giving the error message.
I hope this helps,
Regards,
Raju Chitale
12-23-2008 5:31 AM