*&---------------------------------------------------------------------*
*& Report ZTEST5
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ztest5.
TABLES:ztpac_capacity.
CONSTANTS: c_view TYPE char30 VALUE 'ZTPAC_CAPACITY',
c_u TYPE char1 VALUE 'U',
c_and TYPE char3 VALUE 'AND'.
DATA: gt_seltab TYPE STANDARD TABLE OF vimsellist.
DATA: g_fieldname TYPE vimsellist-viewfield.
DATA: gt_exclude TYPE TABLE OF vimexclfun,
gwa_exclude TYPE vimexclfun.
SELECT-OPTIONS: s_id FOR ztpac_capacity-werks.
*Add ID column to selection criteria of Table maintenanace view
g_fieldname = 'WERKS'.
CALL FUNCTION 'VIEW_RANGETAB_TO_SELLIST'
EXPORTING
fieldname = g_fieldname
append_conjunction = c_and
TABLES
sellist = gt_seltab
rangetab = s_id.
"屏闭按钮
gwa_exclude-function = 'NEWL'.
APPEND gwa_exclude TO gt_exclude.
gwa_exclude-function = 'KOPE'.
APPEND gwa_exclude TO gt_exclude.
gwa_exclude-function = 'DELE'.
APPEND gwa_exclude TO gt_exclude.
gwa_exclude-function = 'AEND'.
APPEND gwa_exclude TO gt_exclude.
* Call to the 'VIEW_MAINTENANCE_CALL' function module
CALL FUNCTION 'VIEW_MAINTENANCE_CALL'
EXPORTING
action = 'S' " S/U/T
view_name = c_view
TABLES
dba_sellist = gt_seltab
excl_cua_funct = gt_exclude
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.
阅读(4091) | 评论(0) | 转发(0) |