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: 

select option

Former Member
0 Kudos

hi,

How to make a to-field mandatory in a select-options. This is my select-option.

select-options:

s_rpmax for zupi5t-rpmax obligatory no-extension. "Period

This is an obligatory field. If i try to execute the program without giving any data then this will rise an error message (because its an obligatory field right).

But the requirement is when i execute the program by giving data in the from-field and not giving the data in to-field of select-option then also the error message should rise.

Is there any way to do that if so please help me out.

Thanks & Regards

Ramya.

1 ACCEPTED SOLUTION

kesavadas_thekkillath
Active Contributor
0 Kudos

select-options:

s_rpmax for zupi5t-rpmax no-extension. "Period

at selection-screen on s_rpmax.

if s_rpmax-low is initial or s_rpmax-high is initial.

throw error.

endif.

7 REPLIES 7

former_member156446
Active Contributor
0 Kudos

then remove the obligatory and code it in ur program

saying

if s_rpmax-low is initial.

message I

end if.

if s_rpmax-high is initial.

message I

endif.

kesavadas_thekkillath
Active Contributor
0 Kudos

select-options:

s_rpmax for zupi5t-rpmax no-extension. "Period

at selection-screen on s_rpmax.

if s_rpmax-low is initial or s_rpmax-high is initial.

throw error.

endif.

Former Member
0 Kudos

Hi,

Remove no extension and try

Regards

Former Member
0 Kudos

Hi Ramya,

Obligatory in Select-Options is used to check only the Lower Range.

I would suggest a solution to check upper range also.

Take 2 obligatory parameters where first parameter represents lower range(From) and second parameter represents higher range(to).

Then take a range variable and assign these values to this range and use this range variable in ur selection.

awrd points if helpful

Bhupal

Former Member
0 Kudos

SELECT-OPTIONS : s_rpmax for zupi5t-rpmax obligatory.

***

AT SELECTION-SCREEN.

if s_rpmax-low is initial.

MESSAGE e184(sabapdocu) WITH 'The second field is found empty'.

endif.

Former Member
0 Kudos

Hi try this,

After ur select statment go for the below message.

s_rpmax for zupi5t-rpmax obligatory .

if s_rpmax-high = ' '.

message e000(00) with 'enter to value'.

endif.

Former Member
0 Kudos

Hi Ramya,

Try this.

select-options: s_rpmax for zupi5t-rpmax obligatory no-extension.

AT SELECTION-SCREEN OUTPUT.

loop at screen.

if screen-name eq 'S_RPMAX-HIGH'.

screen-required = 1.

modify screen.

endif.

endloop.

Rewards points if helpful.

Regards,

Srinivas Ch