‎2010 Jan 12 11:21 AM
Hi Experts,
I have created a table control in which i have attached a search help for the first field in the
table control. Now i want to put a validation such that if the user enters any value other than
that displayed in the search help, then it should fire a message saying wrong or invalid entry.
Like for example, if the first field contains material number and if the user enters any number
like 12345, the it should fire a message.
I tried to fire an error message saying 'This material does not exist'. But the problem is that
the entire screen gets disabled. I cannot enter anything in any of the fields. The entire screen
is disabled. None of the field is editable. then how will the user be able to reenter the
correct value.
Please suggest some solution as to how to carry this validation
Thanks in advance
‎2010 Jan 12 11:28 AM
Hi,
you sholud use CHAIN ENDCHAIN.
Your validating must be inside these, like this:
CHAIN.
FIELD gs_ger_cont-matnr.
MODULE check_matnr ON CHAIN-REQUEST.
ENDCHAIN.
There you can set a error message and only fields inside CHAIN will be editable.
Regards,
Frisoni
‎2010 Jan 12 11:28 AM
Hi,
you sholud use CHAIN ENDCHAIN.
Your validating must be inside these, like this:
CHAIN.
FIELD gs_ger_cont-matnr.
MODULE check_matnr ON CHAIN-REQUEST.
ENDCHAIN.
There you can set a error message and only fields inside CHAIN will be editable.
Regards,
Frisoni
‎2010 Jan 12 12:39 PM
‎2010 Jan 12 11:29 AM
where you wrote the code for that...
you have to check in
chain.
field <fieldname> module <modulename>
endchain.
Edited by: shilpi agarwal on Jan 12, 2010 12:29 PM
‎2010 Jan 12 12:48 PM
to avoid this you can either display the f4 help as list box, its possible to change in screen attributes.
or validate in PAI.
in PAI
LOOP AT it INTO wa.
FIELD wa-matnr
MODULE check.
MODULE update.
ENDLOOP.
here in module check you can validate it.