使用VIEW_MAINTENANCE_CALL維護tableview
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.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/90072/viewspace-974772/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Swift tableView基本使用SwiftView
- EBS DBA日常維護使用的sqlSQL
- 依法使用網路維護資訊保安
- TornadoFx的TableView元件使用View元件
- 病毒預防與硬碟使用與維護硬碟
- TableViewView
- PSQL基本使用(定製維護指令碼)SQL指令碼
- 個人IDEA使用記錄(持續維護)Idea
- 資料維護和基礎架構維護-有感架構
- OCR維護命令
- RAC維護命令
- mysql 管理維護MySql
- 系統維護
- RAC維護工具
- 使用RMAN執行維護操作——RMAN使用者手冊
- PLC維護有何難處?如何實現遠端維護?
- 軟體的維護
- WebViewJavascriptBridge停止維護WebViewJavaScript
- oracle goldengate維護OracleGo
- VotingDisk維護命令
- RAC維護管理命令
- OGG維護命令
- AIX常用維護操作AI
- Oracle RAC 日常維護Oracle
- Oracle RAC維護命令Oracle
- dba 常用維護sqlSQL
- oracle維護相關Oracle
- Oracle 索引的維護Oracle索引
- RAC日常維護命令
- oracle 維護常用SQLOracleSQL
- PG日常維護(一)
- 維護區間資訊
- ORACLE 11G 維護視窗和自動維護任務Oracle
- 瞭解和使用kfed維護ASM後設資料ASM
- linux系統使用命令維護RHCS的方法Linux
- Oracle密碼檔案的建立、使用和維護 (zt)Oracle密碼
- ERP裝置維護系統——改善維護工作的法寶(轉)
- tableView小結View