从FM:VIEW_MAINTENANCE_CALL中删除掉权限检查的代码
- REPORT YTEST_006.
-
- DATA:DBA_SELLIST LIKE VIMSELLIST OCCURS 0,
- EXCL_CUA_FUNCT LIKE VIMEXCLFUN OCCURS 0,
- X_HEADER LIKE VIMDESC OCCURS 0 WITH HEADER LINE,
- X_NAMTAB LIKE VIMNAMTAB OCCURS 0,
- DPL_SELLIST LIKE VIMSELLIST.
-
- CALL FUNCTION 'VIEW_GET_DDIC_INFO'
- EXPORTING
- VIEWNAME = 'ZPP90_MACHINE'
- * VARIANT_FOR_SELECTION = ' '
- * ZDM_CALL =
- TABLES
- SELLIST = DBA_SELLIST
- X_HEADER = X_HEADER
- X_NAMTAB = X_NAMTAB
- EXCEPTIONS
- NO_TVDIR_ENTRY = 1
- TABLE_NOT_FOUND = 2
- OTHERS = 3.
- IF SY-SUBRC <> 0.
- * Implement suitable error handling here
- ENDIF.
-
- DATA:LOCKUSER TYPE SY-UNAME,
- ANSWER(1) TYPE C.
- CALL FUNCTION 'VIEW_ENQUEUE'
- EXPORTING
- VIEW_NAME = 'ZPP90_MACHINE'
- ACTION = 'E'
- ENQUEUE_MODE = 'E'
- EXCEPTIONS
- FOREIGN_LOCK = 1
- SYSTEM_FAILURE = 2
- TABLE_NOT_FOUND = 5
- CLIENT_REFERENCE = 7.
-
- IF SY-SUBRC NE 0.
- MESSAGE 'Data locked' TYPE 'S' DISPLAY LIKE 'E'.
- RETURN.
- ENDIF.
-
-
- CALL FUNCTION 'VIEW_MAINTENANCE'
- EXPORTING
- * CORR_NUMBER = ' '
- VIEW_ACTION = 'U'
- VIEW_NAME = 'ZPP90_MACHINE'
- * RFC_DESTINATION_FOR_UPGRADE = ' '
- * CLIENT_FOR_UPGRADE = ' '
- * COMPLEX_SELCONDS_USED = ' '
- * NO_WARNING_FOR_CLIENTINDEP = ' '
- * OC_INST =
- TABLES
- DBA_SELLIST = DBA_SELLIST
- EXCL_CUA_FUNCT = EXCL_CUA_FUNCT
- X_HEADER = X_HEADER
- X_NAMTAB = X_NAMTAB
- * DPL_SELLIST =
- EXCEPTIONS
- MISSING_CORR_NUMBER = 1
- NO_DATABASE_FUNCTION = 2
- NO_EDITOR_FUNCTION = 3
- NO_VALUE_FOR_SUBSET_IDENT = 4
- OTHERS = 5.
-
- CALL FUNCTION 'VIEW_ENQUEUE'
- EXPORTING
- VIEW_NAME = 'ZPP90_MACHINE'
- ACTION = 'D'
- ENQUEUE_MODE = 'E'
- EXCEPTIONS
- FOREIGN_LOCK = 1
- SYSTEM_FAILURE = 2
- TABLE_NOT_FOUND = 5
- CLIENT_REFERENCE = 7.