2013 Mar 23 12:34 PM
Hey ya'll ,
I have selection screen with selection option for equipments I use select statement for all entries in that range to get the rest data , my Q is how can I exclude the ones in defined the ‘Exclude Ranges ’ tab and ‘Exclude Single Value ‘ tab in smart way .
2013 Mar 25 3:32 AM
Hi Nora,
You can use the function module SELECT_OPTIONS_RESTRICT.
This function module simplifies the handling of SELECT-OPTIONS on the selection screen by restricting possible selection options and signs.
By calling this function module, you can restrict the number of select-options available for the chosen selection field. You can also disable the function allowing users to enter values to be excluded from the selection (SIGN = 'E'). The set of options (and signs) listed here can be extended for the 'multiple selection' screen.
CALL FUNCTION 'SELECT_OPTIONS_RESTRICT' "Make use of SELECT-OPTIONS easier on the selection screen
EXPORTING
* program = " sy-repid Program name (default SY-CPROG or SY-LDBPG)
restriction = " sscr_restrict Description of restrictions
* db = SPACE " rsscr-db X: Call using logical database
EXCEPTIONS
TOO_LATE = 1 " Call is too late
REPEATED = 2 " Multiple call using LDB or report
SELOPT_WITHOUT_OPTIONS = 3 " One of the select-options contains no valid options
SELOPT_WITHOUT_SIGNS = 4 " One of the select-options does not have a valid sign
INVALID_SIGN = 5 " Invalid sign
EMPTY_OPTION_LIST = 6 " One of the options lists is empty
INVALID_KIND = 7 " One line has a KIND value unequal to A, B, or S
REPEATED_KIND_A = 8 " More than one line has KIND = 'A'
. " SELECT_OPTIONS_RESTRICT
I hope it will be helpful for you.
Regards,
Gourav
Hey ya'll ,
I have selection screen with selection option for equipments I use select statement for all entries in that range to get the rest data , my Q is how can I exclude the ones in defined the ‘Exclude Ranges ’ tab and ‘Exclude Single Value ‘ tab in smart way .
2013 Mar 23 6:51 PM
2013 Mar 25 3:22 AM
You should not use for all entries for a range/select options. Simply use IN:
Select field1 field2 from tab1 into table itab where field1 IN select_options_xx.
It will handle all values (including or excluding) in your range/select options
2013 Mar 25 3:28 AM
hi,
Before processing your for all entries you should populate your selection option internal table with the range you need ..
then process for for all entries as a normal way..
hope it helps,
Vinoth
2013 Mar 25 3:32 AM
Hi Nora,
You can use the function module SELECT_OPTIONS_RESTRICT.
This function module simplifies the handling of SELECT-OPTIONS on the selection screen by restricting possible selection options and signs.
By calling this function module, you can restrict the number of select-options available for the chosen selection field. You can also disable the function allowing users to enter values to be excluded from the selection (SIGN = 'E'). The set of options (and signs) listed here can be extended for the 'multiple selection' screen.
CALL FUNCTION 'SELECT_OPTIONS_RESTRICT' "Make use of SELECT-OPTIONS easier on the selection screen
EXPORTING
* program = " sy-repid Program name (default SY-CPROG or SY-LDBPG)
restriction = " sscr_restrict Description of restrictions
* db = SPACE " rsscr-db X: Call using logical database
EXCEPTIONS
TOO_LATE = 1 " Call is too late
REPEATED = 2 " Multiple call using LDB or report
SELOPT_WITHOUT_OPTIONS = 3 " One of the select-options contains no valid options
SELOPT_WITHOUT_SIGNS = 4 " One of the select-options does not have a valid sign
INVALID_SIGN = 5 " Invalid sign
EMPTY_OPTION_LIST = 6 " One of the options lists is empty
INVALID_KIND = 7 " One line has a KIND value unequal to A, B, or S
REPEATED_KIND_A = 8 " More than one line has KIND = 'A'
. " SELECT_OPTIONS_RESTRICT
I hope it will be helpful for you.
Regards,
Gourav
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |