메뉴 건너뛰기

SAP 한국 커뮤니티

Lock/Unlock the ABAP Editor Lock Field

sapjoy 2006.12.20 23:50 조회 수 : 3905 추천:43

TABLES: TRDIR. "System table TRDIR

PARAMETERS: PROGRAM LIKE TRDIR-NAME.
PARAMETERS: EDITOR  LIKE TRDIR-EDTX.

SELECT SINGLE * FROM TRDIR WHERE NAME = PROGRAM.

TRDIR-EDTX = EDITOR.
MODIFY TRDIR.
IF SY-SUBRC EQ 0.
   WRITE: / 'Editor Lock update Successful ', TRDIR-NAME.
   IF TRDIR-EDTX = 'X'.
      WRITE: ' Lock'.
   ELSE.
      WRITE: ' UnLock'.
   ENDIF.
ELSE.
   WRITE: / 'Editor Lock update Unsuccessful ', TRDIR-NAME.
ENDIF.