‎2006 Aug 21 8:26 PM
Hi everybody,
On selection screen i have my select-option for plant WERKS S_WERKS
this has to accept only '1100' and '1700'
both can be in low and high of the select-option
could u help me how to do this
Regards
VC
‎2006 Aug 21 8:35 PM
I usually don't like doing validations on select-option, but if I have to, then I would start with something like this.
report zrich_0001.
tables: marc.
ranges: r_werks for marc-werks.
select-options: s_werks for marc-werks.
initialization.
r_werks-sign = 'I'.
r_werks-option = 'EQ'.
r_werks-low = '1100'.
append r_werks.
r_werks-low = '1700'.
append r_werks.
at selection-screen.
loop at s_werks.
if not s_werks-low in r_werks
and not s_werks-low is initial.
message e001(00) with 'Plant not valid'.
endif.
if not s_werks-high in r_werks
and not s_werks-high is initial.
message e001(00) with 'Plant not valid'.
endif.
endloop.
Regards,
Rich Heilman
‎2006 Aug 21 8:35 PM
I usually don't like doing validations on select-option, but if I have to, then I would start with something like this.
report zrich_0001.
tables: marc.
ranges: r_werks for marc-werks.
select-options: s_werks for marc-werks.
initialization.
r_werks-sign = 'I'.
r_werks-option = 'EQ'.
r_werks-low = '1100'.
append r_werks.
r_werks-low = '1700'.
append r_werks.
at selection-screen.
loop at s_werks.
if not s_werks-low in r_werks
and not s_werks-low is initial.
message e001(00) with 'Plant not valid'.
endif.
if not s_werks-high in r_werks
and not s_werks-high is initial.
message e001(00) with 'Plant not valid'.
endif.
endloop.
Regards,
Rich Heilman
‎2006 Aug 21 9:01 PM
Hi Venkatesh,
Use the piece of code under INITIALIZATION event of your report.
<b>INITIALIZATION.
S_WERKS-LOW = '1100'.
S_WERKS-HIGH = '1700'.
S_WERKS-SIGN = 'I'.
S_WERKS-OPTION = 'EQ'.
APPEND S_WERKS.</b>
If you execute your report then you will have 1100 as low value and 1700 as high value for your select option werks.
Thanks,
Vinay