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

Doubt on Selection screen validation

Former Member
0 Likes
734

Hi gurus,

I have selection screen field as storage location. I need validate that select-option field. But here that storage location have only 3 fixed values. How to do validation on the select-option for the fixed values.

Please suggest me how to do this.

Thanks in Advance.

Thanks and Regards

Siri.....

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
720

Hi,

You can use VALUE CHECK with your select options.

Award Points if useful.

6 REPLIES 6
Read only

Former Member
0 Likes
721

Hi,

You can use VALUE CHECK with your select options.

Award Points if useful.

Read only

0 Likes
720

Hi shree,

Can u please explain what is value check clearly..

Thanks in advance

Thanks and Regards

Siri..

Read only

0 Likes
720

Hi ,

Use the Event

If SLOC is ur storage location variable.

AT SELECTION SCREEN ON SLOC.

LOOP AT SLOC WHERE LOW = '1000' OR LOW = '2000'.

*WRITE UR VALIDATION CODE HERE*

ENDLOOP.

Regards ,

Balakumar.G.

Reward Points if helpful.

Read only

0 Likes
720

Hi balakumar,

Thanks for giving valuable suggestion.. My problem was solved.I rewarded with points..

Thanks and Regards

Siri..

Read only

Former Member
0 Likes
720

hi use this,

data:v_lgort like mard-lgort.

at selection-screen.

select single lgort

from mard

into v_lgort

where lgort = '1000' or

lgort = '2000' or

lgort = '3000'.

if sy-subrc ne 0.

message e001 with 'enter a valid storage location'.

endif.

regards,

venkat.

Read only

kiran_k8
Active Contributor
0 Likes
720

Abhi,

Use ranges and validate it with selection screen field.

RANGES : s_lgort FOR -mard-lgort.

s_lgort-sign = 'I'.

s_lgort-option = 'EQ'.

s_lgort-low = 'XXX'.

APPEND s_lgort.

s_lgort-low = 'YYY'.

APPEND s_lgort.

s_lgort-low = 'ZZZ'.

APPEND s_lgort.

K.Kiran.