Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Error message from user exit - current screen becomes grayed(non-editable)

Former Member
0 Kudos

I am working on a Sales Order (VA01/VA02) user exit(USEREXIT_SAVE_DOCUMENT_PREPARE) in MV45AFZZ program. I am validating certain values entered by user in this exit. Based on a condition, I issue a error message e.g. "message e001(ZV) with .....". I expect the processing to interrupt and the system control returns to the current screen. When there is an error, error message shows up on the status bar, but the current screen is completely grayed out(non-editable), not able to modify the incorrect entries. I keep hitting ENTER but no change to the grayed screen. Is there anything wrong in the way I issue error message?

I am on ECC6.

Thanks.

9 REPLIES 9

Former Member
0 Kudos

Similiar kind of problems has been discussed many times. USEREXIT_SAVE_DOCUMENT_PREPARE is not the proper place to implement the validations. Use the user-exits with "CHECK" form routines to do the validation.

Regards, vinod

0 Kudos

I need to validate XVBPA-KUNNR (partner) values and send an ERROR message. For this, as you suggested, I do not see any XVBPA/VBPA CHECK user exit.

Thank you.

0 Kudos

Have you checked the user exit MV45AFZB? IMO, even if you are validating the values of partner functions (VBPA/XVBPA), CHECK form-routines get executed. USEREXIT_CHECK_VBAK will get executed if the partner is associated at header level & USEREXIT_CHECK_VBAP will get executed if the partner is associated at item level.

Regards, Vinod

0 Kudos

Hi Vinod,

USEREXIT_CHECK_VBAK has the same behaviour as the *DOCUMENT_PREPARE exit. Message E makes the current screen non-editable(fileds not open for modification).

Thanks!

0 Kudos

I don't think so(SAP documentation doesn't say like what you mentioned). I debugged the exit USEREXIT_CHECK_VBAP with an existing code which raises an error message after validation (error type E). System stops the further processing till the user enter correct data (with editable fields). Unfortunately, i am not able to similate the scenario in CHECK_VBAK.

Regards, Vinod

0 Kudos

As I mentioned before, I am validating XVBPA-KUNNR entries on "Header details", "Partner" tab. May be you are mentioning about validating XVBAP entries using the CHECK_VBAP exit? I tried validating XVBPA-KUNNR in CHECK_VBAK (which is the closest; as there is no CHECK_VBPA exit) and I am stuck at that grayed screen, cant go back(F3) either

Thanks!

0 Kudos

I found a solution.

I created an enhancement(spot) in PAI of he screen and wrote my validations. There could be other solutions/approaches as well.

Thanks to every one who took time to help!

0 Kudos

could you please help me if possible in my senario :-

I am validating a field(serial number while creating delivery) in standard exit ZXQSMU04 and written a code to display an error message. The functionality is working correctly on validation and displaying the error message. But once the error is getting trigger the serial number field is becoming in gray mode i.e non editable.

I tried a lot to overcome this issue but not getting success could anyone help me to make the field editable while triggering the error message.

Please note : Its an exit and not having any message field in export or return table. Also tried with warning and information message.

Thanks in advance.

Regards,

Gautam Kumar

Former Member
0 Kudos

Hi ,

An error message disables screen for input.

Try using chain end chain and make fields editable.

Or use a different type of message.

You can refer to :

[;