Application Development and Automation 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: 
Read only

Error message in table control

Former Member
0 Likes
924

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

1 ACCEPTED SOLUTION
Read only

guilherme_frisoni
Contributor
0 Likes
637

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

4 REPLIES 4
Read only

guilherme_frisoni
Contributor
0 Likes
638

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

Read only

0 Likes
637

Thanks a lot Frisoni.

Read only

Former Member
0 Likes
637

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

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
637

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.