ITPub博客

首页 > IT基础架构 > 网络安全 > 使用VIEW_MAINTENANCE_CALL维护tableview

使用VIEW_MAINTENANCE_CALL维护tableview

原创 网络安全 作者:qiujun 时间:2007-10-05 10:16:46 0 删除 编辑

REPORT ztest.
TABLES t001b.
TYPES:
BEGIN OF ty_mkoar,
mkoar TYPE mkoar,
END OF ty_mkoar.

DATA: it_vimsellist TYPE TABLE OF vimsellist,
iw_vimsellist TYPE vimsellist,
it_vimexclfun TYPE TABLE OF vimexclfun,
iw_vimexclfun TYPE vimexclfun.
DATA: it_mkoar TYPE TABLE OF ty_mkoar,
iw_mkoar TYPE ty_mkoar.
DATA: w_flg TYPE c.

PARAMETERS p_bukrs TYPE t001b-bukrs.

SELECT-OPTIONS: s_mkoar FOR t001b-mkoar.

START-OF-SELECTION.

SELECT mkoar
INTO CORRESPONDING FIELDS OF TABLE it_mkoar
FROM t001b
WHERE mkoar IN s_mkoar.

*编辑过滤数据条件
iw_vimsellist-viewfield = 'BUKRS'.
iw_vimsellist-operator = 'EQ'.
iw_vimsellist-and_or = 'AND'.
iw_vimsellist-value = p_bukrs.
APPEND iw_vimsellist TO it_vimsellist.

LOOP AT it_mkoar INTO iw_mkoar.
iw_vimsellist-viewfield = 'MKOAR'.
iw_vimsellist-operator = 'EQ'.
iw_vimsellist-and_or = 'OR'.
iw_vimsellist-value = iw_mkoar-mkoar.
APPEND iw_vimsellist TO it_vimsellist.
CLEAR iw_mkoar.
ENDLOOP.
*屏蔽按钮(按T-CODE)
iw_vimexclfun-function = 'NEWL'.
APPEND iw_vimexclfun TO it_vimexclfun.
iw_vimexclfun-function = 'KOPE'.
APPEND iw_vimexclfun TO it_vimexclfun.
iw_vimexclfun-function = 'DELE'.
APPEND iw_vimexclfun TO it_vimexclfun.

CALL FUNCTION 'VIEW_MAINTENANCE_CALL'
EXPORTING
action = 'U'
view_name = 'V_T001B'
TABLES
dba_sellist = it_vimsellist
excl_cua_funct = it_vimexclfun
EXCEPTIONS
client_reference = 1
foreign_lock = 2
invalid_action = 3
no_clientindependent_auth = 4
no_database_function = 5
no_editor_function = 6
no_show_auth = 7
no_tvdir_entry = 8
no_upd_auth = 9
only_show_allowed = 10
system_failure = 11
unknown_field_in_dba_sellist = 12
view_not_found = 13
maintenance_prohibited = 14
OTHERS = 15.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.

[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/90072/viewspace-974772/,如需转载,请注明出处,否则将追究法律责任。

上一篇: ON CHANGE OF 的用法
请登录后发表评论 登录
全部评论
  • 博文量
    107
  • 访问量
    849840