메뉴 건너뛰기

SAP 한국 커뮤니티

온라인 스크린에서 SELECT-OPTION 사용하기

sapjoy 2007.02.12 00:14 조회 수 : 7846 추천:53

1) 1010 번 스크린을 만들고, subscreen area를 지정한다.
    subscreen area 명 : s1001.

2) Selection screen 코드를 작성한다.
*-- Selection screen
selection-screen begin of screen 1010 as subscreen.
SELECTION-SCREEN BEGIN OF BLOCK BOX1 WITH FRAME.
PARAMETERS:     PA_BUKRS TYPE ANLA-BUKRS MEMORY ID BUK OBLIGATORY.
SELECT-OPTIONS: SO_GSBER FOR  TGSB-GSBER MEMORY ID GSB OBLIGATORY,
                SO_ANLKL FOR  ANLA-ANLKL MEMORY ID ANK OBLIGATORY,
                SO_ANLN1 FOR  ANLA-ANLN1,
                SO_BUDAT FOR  ANEK-BUDAT OBLIGATORY.

SELECTION-SCREEN END OF BLOCK BOX1.

SELECTION-SCREEN BEGIN OF BLOCK BOX2 WITH FRAME.
PARAMETERS: PA_HISTO  AS CHECKBOX.
SELECTION-SCREEN END OF BLOCK BOX2.
selection-screen end of screen 1010.

3) Screen 100번
process before output.
  module status_0100.
  module set_cursor_field.    "Cursor 위치 설정.
  CALL SUBSCREEN s1001 INCLUDING sy-repid '1010'.

process after input.
  module exit_0100 at exit-command.
  module get_cursor_field.    "현재 커서위치 읽기

  CALL SUBSCREEN s1001.
  module user_command_0100.

출처 :  WWW.RACEFROG.NET