IT WORK/SAP FI and ABAP

[ABAP] SELECT-OPTIONS 제한하기 How to restrict SELECT-OPTION

Bathildis 2016. 5. 13. 10:00
반응형
* 필수선언 Mandatory Declaration
TYPE-POOLS : SSCR.

DATA : RESTRICT  TYPE SSCR_RESTRICT.
DATA : OPTLIST TYPE SSCR_OPT_LIST,
       ASS     TYPE SSCR_ASS.

* 프로그램 INIT 부분에서 제어해준다. Control SELECT-OPTIONS in INIT part

  optlist-name = 'OBJECTKEY1'.

  MOVE 'X' TO : optlist-options-bt,
                optlist-options-cp,
                optlist-options-eq,
                optlist-options-ge,
                optlist-options-gt,
                optlist-options-le,
                optlist-options-lt,
                optlist-options-nb,
                optlist-options-ne,
                optlist-options-np.

  APPEND optlist TO restrict-opt_list_tab.

  ass-kind = 'S'.
  ass-name = 'S_KOSTL'. " 제한을 줄 Select-option의 이름 Name of the option you want to control
  ass-sg_main = 'I'.
  ass-sg_addy = ''.
  ass-op_main = 'OBJECTKEY1'.
  APPEND ass TO restrict-ass_tab.

  CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
    EXPORTING
      restriction = restrict.

 

반응형

 

반응형