on 02-17-2005 11:50 AM
Hi Everybody,
I am facing a problem with f.m SELECT_OPTIONS_RESTRICT.
I want to restrict user, so that he will only be able to exclude values (single, multiple or range) from a selection-option.
The code snippet is as follows:
item messages -> restrict selection
opt_list-name = 'EXCLUDE'.
opt_list-options-ne = 'X'.
opt_list-options-nb = 'X'.
APPEND opt_list TO restrict-opt_list_tab.
ass-kind = 'B'.
ass-name = 'A2'.
ass-sg_main = 'I'.
ass-sg_addy = ' '.
ass-op_main = 'EXCLUDE'.
ass-op_addy = 'EXCLUDE'.
APPEND ass TO restrict-ass_tab.
CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
EXPORTING
PROGRAM =
restriction = restrict
DB = ' '
EXCEPTIONS
TOO_LATE = 1
REPEATED = 2
SELOPT_WITHOUT_OPTIONS = 3
SELOPT_WITHOUT_SIGNS = 4
INVALID_SIGN = 5
EMPTY_OPTION_LIST = 6
INVALID_KIND = 7
REPEATED_KIND_A = 8
OTHERS = 9
.
But this is only including the single multiple and range value. Can anyone throw some light on it?
Thanks
Samit
Hi Charles and Samit,
so it's missing functionality ?
and it's not possible to say:
ass-sg_main = 'E'. "-> short dump INVALID_SIGN
regards Andreas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I took a look at the documentation of this FM to confirm what I was thinking:
"You can also disable the function allowing users to enter values to be excluded from the selection (SIGN = 'E')."
So I think this is trying to tell us that we can turn off the ability for the user to enter "exclude" but we cannot turn off the option for the user to enter "include" options.
When you set ass-sg_main = 'I', it means that only "include" options are allowed.
I think you will need to do your own validation.
In the event AT SELECTION SCREEN you can do a LOOP on your selection option name and validate the users selections:
LOOP AT SO_MINE.
IF SO_MINE-SIGN NE 'E'.
SET CURSOR FIELD 'SO_MINE-LOW'.
MESSAGE E123.
ENDIF.
ENDLOOP.
It has been awhile since I used this FM so please let us know how it goes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Samit,
It seems to me that you are trying to restrict the options for only one select-options. Then why did you specify ass-kind = 'B' ? You should try it out with ass-kind = 'S' and accordingly set the other options.
Please read the documentation for this FM carefully. There are also illustrative examples in there.
Regards,
Anand Mandalika.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.