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: 

validation

Former Member
0 Kudos
85

I am validating selection options in selection screen.

If i put valid value in lower fields and invalid value in higher field then i am not getting an error message, which should be given when it is invalid value.

please suggest me how to do validation for selection screen

Regards

Rasheed

1 ACCEPTED SOLUTION

jayanthi_jayaraman
Active Contributor
0 Kudos
59

Hi,

tables mara.

select-options s_matnr for mara-matnr.

at selection-screen on s_matnr.

loop at s_matnr.

if s_matnr-low EQ ...

message e000 with 'Invalid lower value'.

leave list-processing.

endif.

if s_matnr-high EQ ...

message e000 with 'Invalid higher value'.

leave list-processing.

endif.

endloop.

3 REPLIES 3

0 Kudos
59

Hi,

Check the high value as follows

supposing your select-options name is selcrit.

AT SELECTION-SCREEN ON selcrit-high.

Check your code in this event block.

Regards,

Sesh

raymond_giuseppi
Active Contributor
0 Kudos
59

If you want that all data is checked, you should check select-HIGH value as soon as option is BT between.

LOOP AT so-name.
* Check so-name-low.
  IF so-name-option eq 'BT'  " between
  OR so-name-option eq 'NB'. " not between
*   Check so-name-high.
  ENDIF.
ENDLOOP.

Regards

jayanthi_jayaraman
Active Contributor
0 Kudos
60

Hi,

tables mara.

select-options s_matnr for mara-matnr.

at selection-screen on s_matnr.

loop at s_matnr.

if s_matnr-low EQ ...

message e000 with 'Invalid lower value'.

leave list-processing.

endif.

if s_matnr-high EQ ...

message e000 with 'Invalid higher value'.

leave list-processing.

endif.

endloop.