Hi guys ,
I would like to restrict a select options. When I push the botton "multiple selection" in my select
options I would like that I can see only 2 tabs 'Exclude individual values' and 'Exclude intervals'.
I tried with the FM 'SELECT_OPTIONS_RESTRICT', but It doesn't work. When I execute sy-subrc = 5
'INVALID_SIGN' and I can't resolve it.
My code is:
SELECTION-SCREEN: BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
SELECT-OPTIONS: S_BUDAT FOR BKPF-BUDAT,
S_BELNR FOR BKPF-BELNR,
S_HKONT FOR BSEG-HKONT, <----*restric this*
S_BLART FOR BKPF-BLART,
S_BSTAT FOR BKPF-BSTAT.
SELECTION-SCREEN: END OF BLOCK B2.
INITIALIZATION.
CLEAR T_OPT_LIST. T_OPT_LIST-NAME = 'S_HKONT'. T_OPT_LIST-OPTIONS-EQ = 'X'. T_OPT_LIST-OPTIONS-GE = 'X'. APPEND T_OPT_LIST TO RESTRICT-OPT_LIST_TAB. CLEAR T_ASS_TAB. T_ASS_TAB-KIND = 'A'. "Apply only to the named SELECT-OPTION T_ASS_TAB-NAME = 'S_HKONT'. "This is name of the SELECT-OPTION T_ASS_TAB-SG_MAIN = 'I'. T_ASS_TAB-OP_MAIN = 'S_HKONT'. "This must match opt_list-name APPEND T_ASS_TAB TO RESTRICT-ASS_TAB.
CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
EXPORTING
RESTRICTION = RESTRICT
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.
Thanks in advance.
Best Regards.
😊
Edited by: Ana Marí on Apr 12, 2010 12:13 PM