*----------------------------------------------------------------------* * DECLARATIONS * *----------------------------------------------------------------------* TABLES: VBRK. TYPE-POOLS: SSCR. DATA: gt_ass TYPE SSCR_ASS, gt_opt_list TYPE SSCR_OPT_LIST, gt_restrict TYPE SSCR_RESTRICT. *----------------------------------------------------------------------* * LAYOUT * *----------------------------------------------------------------------* SELECT-OPTIONS: so_gjahr FOR VBRK-GJAHR. *----------------------------------------------------------------------* * INIT * *----------------------------------------------------------------------* INITIALIZATION. CLEAR gt_ass. gt_ass-kind = 'S'. gt_ass-name = 'SO_GJAHR'. gt_ass-sg_main = 'I'. gt_ass-op_main = 'OP_GJAHR'. APPEND gt_ass TO gt_restrict-ass_tab. CLEAR gt_opt_list. gt_opt_list-name = 'OP_GJAHR'. "This must match ass_tab-op_main * gt_opt_list-options-bt = SPACE. "Do not permit BETWEEN * gt_opt_list-options-cp = SPACE. "Do not permit MATCHES-PATTERN gt_opt_list-options-eq = 'X'. " permit EQUALS * gt_opt_list-options-ge = SPACE. "Do not permit GREATER-OR-EQUAL * gt_opt_list-options-gt = SPACE. "Do not permit GREATER-THAN * gt_opt_list-options-le = SPACE. "Do not permit LESS-OR-EQUAL * gt_opt_list-options-lt = SPACE. "Do not permit LESS-THAN * gt_opt_list-options-nb = SPACE. "Do not permit NOT-BETWEEN * gt_opt_list-options-ne = SPACE. "Do not permit NOT-EQUAL * gt_opt_list-options-np = SPACE. "Do not permit NO-PATTERN-MATCH APPEND gt_opt_list TO gt_restrict-opt_list_tab. CALL FUNCTION 'SELECT_OPTIONS_RESTRICT' EXPORTING RESTRICTION = gt_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.
lunedì 8 settembre 2014
Ridurre le possibilità di una Select Option
Iscriviti a:
Commenti sul post (Atom)
Nessun commento:
Posta un commento