아래 샘플 소스를 참고하시기 바랍니다...
REPORT yssrestrict.
TYPE-POOLS: sscr.
TABLES: marc.
* Define the object to be passed to the RESTRICTION parameter
DATA: gs_restrict TYPE sscr_restrict.
* Auxiliary objects for filling RESTRICT
DATA: gs_optlist TYPE sscr_opt_list,
gs_ass TYPE sscr_ass.
*----------------------------------------------------------------------*
* SELECTION-SCREEN
*----------------------------------------------------------------------*
SELECT-OPTIONS:
s_matnr FOR marc-matnr,
s_werks FOR marc-werks.
*----------------------------------------------------------------------*
* INITIALIZATION
*----------------------------------------------------------------------*
INITIALIZATION.
* Restricting the MATNR selection to only EQ and 'BT'.
gs_optlist-name = 'OBJECTKEY1'.
gs_optlist-options-eq = 'X'.
gs_optlist-options-bt = 'X'.
APPEND gs_optlist TO gs_restrict-opt_list_tab.
gs_ass-kind = 'S'.
gs_ass-name = 'S_MATNR'.
gs_ass-sg_main = 'I'.
gs_ass-sg_addy = space.
gs_ass-op_main = 'OBJECTKEY1'.
APPEND gs_ass TO gs_restrict-ass_tab.
* Restricting the WERKS selection to CP, GE, LT, NE.
gs_optlist-name = 'OBJECTKEY2'.
gs_optlist-options-cp = 'X'.
gs_optlist-options-ge = 'X'.
gs_optlist-options-lt = 'X'.
gs_optlist-options-ne = 'X'.
APPEND gs_optlist TO gs_restrict-opt_list_tab.
gs_ass-kind = 'S'.
gs_ass-name = 'S_WERKS'.
gs_ass-sg_main = 'I'.
gs_ass-sg_addy = space.
gs_ass-op_main = 'OBJECTKEY2'.
APPEND gs_ass TO gs_restrict-ass_tab.
CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
EXPORTING
restriction = gs_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.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
* e-abap님에 의해서 게시물 이동되었습니다 (2007-11-15 18:36)
* e-abap님에 의해서 게시물 이동되었습니다 (2007-11-15 18:37)