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

selection-options validation

Former Member
0 Likes
523

i want to do required field validation for select-options:s_slmtnr for mara-matnr.

that is whether user has entered the high and low value.

s_slmtnr-high and low show not be blank.

Moderator message: please search for available information/documentation before asking.

Edited by: Thomas Zloch on Dec 4, 2010 9:49 PM

4 REPLIES 4
Read only

Former Member
0 Likes
481

in screen output, do the validation as

if s_matnr-low = space. message 'error' type 'E'.endif

if s_matnr-high = space. message 'error' type 'E'.endif

Read only

0 Likes
481

aswk,

thanks for the reply.

my code:

  • IF MA_DE = 'X'.

  • IF S_MATUM-LOW = 0 OR S_MATUM-HIGH = 0.

  • MESSAGE: 'PLEASE ENTER RANGE' TYPE 'E'.

  • ENDIF.

  • ENDIF.

but here if i put 'AND' instead of 'OR'.it will not work for both low and high.

what i know is 'AND' is used to do for both true,but here 'OR' works like that why.

Read only

0 Likes
481

Hi

If you.need to check if a low/high value is entered then high/low has to be filled too:

If not s_matner-high is initial and s_matner-low is initial

=> error

ENDIF.

If s_matner-high is initial and not s_matner-low is initial

=> error

ENDIF .

Max

Read only

Former Member
0 Likes
481

Hi

Do the validation in at selection screen event

AT SELECTION-SCREEN.

IF SO_MATNR-LOW IS INITIAL.

MESSAGE 'ENTER FROM MATERIAL' TYPE 'E'.

ENDIF.

IF SO_MATNR-HIGH IS INITIAL.

MESSAGE 'ENTER TO MATERIAL' TYPE 'E'.

ENDIF.

hope it helps

regards

S.Prabhu