函数VIEW_MAINTENANCE_CALL:视图变报表 .

22 篇文章 0 订阅

*&---------------------------------------------------------------------*
*& Report  Ztest_VIEW
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

REPORT  Ztest_VIEW.

*---------------------------------------------------------------------*
* Data Declaration
*---------------------------------------------------------------------*
DATA: GT_EXCL    TYPE TABLE OF VIMEXCLFUN,
      GWA_EXCL   TYPE VIMEXCLFUN.
*---------------------------------------------------------------------*
* START-OF-SELECTION
*---------------------------------------------------------------------*
START-OF-SELECTION.
  " Fill the function codes in exclude table that you want to disable
  GWA_EXCL-FUNCTION 'DELE'. " Function code for delete icon
  APPEND GWA_EXCL TO GT_EXCL.

 " Fill the function codes in exclude table that you want to disable
  GWA_EXCL-FUNCTION 'NEWL'. " Function code for NEW icon
  APPEND GWA_EXCL TO GT_EXCL.
 " ACTION = 'S'
 " Fill the function codes in exclude table that you want to disable
  GWA_EXCL-FUNCTION 'AEND'. " Function code for Change icon  ANZG AEND
  APPEND GWA_EXCL TO GT_EXCL.
*
* " ACTION = 'U'
* " Fill the function codes in exclude table that you want to disable
*  GWA_EXCL-FUNCTION = 'ANZG'. " Function code for Change icon  ANZG AEND
*  APPEND GWA_EXCL TO GT_EXCL.


 " Fill the function codes in exclude table that you want to disable
  GWA_EXCL-FUNCTION 'SAVE'. " Function code for SAVE icon
  APPEND GWA_EXCL TO GT_EXCL.

  CALL FUNCTION 'VIEW_MAINTENANCE_CALL'
    EXPORTING
      ACTION                       'S' " 'U'
      VIEW_NAME                    'ZRUN_CHANGE_PMC'
    TABLES
      EXCL_CUA_FUNCT               GT_EXCL
    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.

 

*&---------------------------------------------------------------------*
*& Progarm      :  ZMAINTAIN_TABLE                Author : Jimmy Wong
*& Created      :  12 Mar 2013                    App    : PP
*& Title        :  Maintain table
*& Description  :  Maintain table
*&DELE
*NEWL
*WB_EXEC
*SAVE
*SLCT
*DELM
*EXPA
*ADDR
*SCRF
*LANG
*TEXT
*GPRF
*UPRF
*BCCH
*TRSP
*ORDR
*&---------------------------------------------------------------------*
*&  Version       Author      Date        description
*&                Jimmy       12 Mar 2013 the first version
*&  the last update time  2013.03.12  12:00
*&---------------------------------------------------------------------*

report  zmaintain_table.

tables : vimexclfun.

data: gt_excl    type table of vimexclfun,
      gwa_excl   type vimexclfun.

*----------------------------------------------------------------------*
*  Parameter & Select-Options                                          *
*----------------------------------------------------------------------*
selection-screen begin of block with frame title text-001.
parameters : p_action type obligatory,
             p_tbl type dd02v-tabname obligatory.
select-options: s_excl for vimexclfun-function no intervals .
selection-screen end of block 1.

*---------------------------------------------------------------------*
* START-OF-SELECTION
*---------------------------------------------------------------------*
start-of-selection.

  loop at s_excl.
    gwa_excl-function s_excl-low.
    append gwa_excl to gt_excl.
  endloop.

  call function 'VIEW_MAINTENANCE_CALL'
    exporting
      action                       'S' " 'U' 'T'
      view_name                    'ZRUN_CHANGE_PMC'
    tables
      excl_cua_funct               gt_excl
    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.

*    " Fill the function codes in exclude table that you want to disable
*  GWA_EXCL-FUNCTION = 'DELE'. " Function code for delete icon
*  APPEND GWA_EXCL TO GT_EXCL.
*
* " Fill the function codes in exclude table that you want to disable
*  GWA_EXCL-FUNCTION = 'NEWL'. " Function code for NEW icon
*  APPEND GWA_EXCL TO GT_EXCL.
* " ACTION = 'S'
* " Fill the function codes in exclude table that you want to disable
*  GWA_EXCL-FUNCTION = 'AEND'. " Function code for Change icon  ANZG AEND
*  APPEND GWA_EXCL TO GT_EXCL.
**
** " ACTION = 'U'
** " Fill the function codes in exclude table that you want to disable
**  GWA_EXCL-FUNCTION = 'ANZG'. " Function code for Change icon  ANZG AEND
**  APPEND GWA_EXCL TO GT_EXCL.
*
*
* " Fill the function codes in exclude table that you want to disable
*  GWA_EXCL-FUNCTION = 'SAVE'. " Function code for SAVE icon
*  APPEND GWA_EXCL TO GT_EXCL.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值