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 logic for select-options

Former Member
0 Likes
1,327

i want validation logic for select-options....

i know this below logic.

but i want complete values validation logic.

select single ebeln from ekko where ebeln in s_ebeln.

if sy-subrc ne 0.

.........

.........

endif.

regards,

sathish.d.

6 REPLIES 6
Read only

Former Member
0 Likes
780

Hi,

Ex:-

select-options: vbeln1 for vbak-vbeln.

at selection-screen on vbeln.

select single vbeln

from vbak

into vbak

where vbeln in vbeln1.

Regards,

Chandu

Read only

0 Likes
780

hi,

thanks for ur responce..

i know this statement,

but i want to validate each and every value in that select-option range.

it is very urgent.

regards,

sathish.d.

Read only

Former Member
0 Likes
780

HI,

then try to write select statement as follows,

select ebeln from ekko into table itab

where ebeln in s_ebeln.

form this select querry u will get all ebeln values with in ur given selection range from ekko table.

Regards,

kk.

Read only

Former Member
0 Likes
780

hi there...

i think this is what u are looking for....

select [col1] [col2] [col3] from [tablename] into table [internal table] where

[col1] in [selectoption1] and

[col2] in [selectoption2] and

.

.

.

.

and so on....

before this, declare an internal table with header line with the number of columns u want to fetch frm the standard table.

do reward if helpful....

Read only

Former Member
0 Likes
780

Hi,

Try the following:

suppose the selectoption field is s_matnr.

declare an internal table of type matnr for getting matnrs from range s_matnr.

select matnr from mara into table it_mara where matnr in s_matnr.

Now

loop at it_mara

select single matnr from mara into wa_matnrwhera matnr = it_mara-matnr.

if sy-subrc = 0.

.............................

else.

..............

endif.

here you can validate each and every matnr.

Hope this is clear.

Reward points if helpful.

Thanks and regards.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
780

im not clear abt ur qn...

just see whether this meets ur qn..

if ur select options has lower and upper limit..apply the code u have

if u want to validate the values in the select options...do some thing like this..

select-options:so_matnr for mara-matnr no-intervals.

at selection-screen.

loop at so_matnr.

select single * from mara where matnr = so_matnr-low.

if sy-subrc <> 0.

message with so_matnr-low.

endif.

endloop.