IT WORK/SAP FI and ABAP

[ABAP] 스크린에서 엔터 입력 후 커서 고정 How to fix the cursor after press enter on screen

Bathildis 2016. 5. 19. 16:06
반응형
PROCESS BEFORE OUTPUT.
  MODULE STATUS_0100.
  MODULE SET_CURSOR. 

 PROCESS AFTER INPUT.
   MODULE GET_CURSOR.
   MODULE USER_COMMAND_0100. 

*&--------------------------------------------------------------*
*&      Module  GET_CURSOR  INPUT
*&--------------------------------------------------------------*
*       text
*---------------------------------------------------------------*
MODULE GET_CURSOR INPUT.
  GET CURSOR FIELD CURSORFIELD.    //현재커서의 위치를 가져옴
ENDMODULE.                 " GET_CURSOR  INPUT

*&--------------------------------------------------------------*
*&      Module  SET_CURSOR  OUTPUT
*&--------------------------------------------------------------*
*       text
*---------------------------------------------------------------*
MODULE SET_CURSOR OUTPUT.
  IF CURSORFIELD = 'SC_AUFNR'.        //현재커서위치가 SC_AUFNR인 경우
    SET CURSOR FIELD 'SC_ZSPERNR'.    //커서위치를 SC_ZSPERNR로 이동시킴
  ENDIF.
ENDMODULE.                 " SET_CURSOR  OUTPUT

출처 : http://ehwaman.co-story.net/xe/index.php?mid=programming&category=229&order_type=desc&sort_index=readed_count&page=1&document_srl=355

반응형