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

validation

Former Member
0 Likes
509

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
Read only

jayanthi_jayaraman
Active Contributor
0 Likes
483

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
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
483

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

Read only

RaymondGiuseppi
Active Contributor
0 Likes
483

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

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
484

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.