‎2008 Jan 07 4:46 AM
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.
‎2008 Jan 07 4:49 AM
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.
‎2008 Jan 07 4:49 AM
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.
‎2008 Jan 07 4:49 AM
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.
‎2008 Jan 07 4:50 AM
‎2008 Jan 07 4:53 AM
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
‎2008 Jan 07 5:14 AM
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.
‎2008 Jan 07 10:02 AM
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.
‎2008 Jan 07 10:08 AM
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