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: 

unable to validate a field in va02 transaction

former_member582508
Participant
0 Kudos

Hi All,

I have a requirement wherein I need to put a validation on the field RV45A-KETDAT (shown in the screenshot below):

I want to throw an error message and make this field editable in case an incorrect date has been entered and "save" button is pressed. I have tried putting my code in USEREXIT_SAVE_DOCUMENT_PREPARE and also USEREXIT_CHECK_VBAP. I eve tried USEREXIT_CHECK_VBAK. But I cannot keep this field editable if I give the error type as 'E'. I have checked several threads in the site but I cannot find the solution .

I gave my logic as below inside FORM USEREXIT_CHECK_VBAP :

IF vbak-vdatu ne '19980428'.

message 'Incorrect date' type 'W' display like 'E'.
ENDIF.

How can I achieve this ?

Regards,

Manish

1 ACCEPTED SOLUTION

former_member582508
Participant
0 Kudos
1 REPLY 1

former_member582508
Participant
0 Kudos