메뉴 건너뛰기

SAP 한국 커뮤니티

CBO 테이블 데이터 변경 프로그램

sapjoy 2008.03.29 02:26 조회 수 : 7504 추천:4

*&---------------------------------------------------------------------*
*& Report  ZTRTUDATE                                                   *
*&                                                                     *
*&---------------------------------------------------------------------*
*&                                                                     *
*&                                                                     *
*&---------------------------------------------------------------------*


report  zqmupdate message-id ztr1.


tables: dd02l.


data: g_tabname(30)  type c          value '/1BCDWB/DB',
      action         type sy-ucomm   value 'ANZE',
      global_auth(4) type c,
      g_data_exit    like rs38l-name value 'UPDA'.


data: mem_id(16) value 'TABELLENANZEIGER'.


*----------------------------------------------------------------------*
* INITIALIZATION                                                       *
*----------------------------------------------------------------------*
initialization.


  perform check_password.


*----------------------------------------------------------------------*
*  SELECTION-SCREEN                                                    *
*----------------------------------------------------------------------*
  selection-screen begin of block frm1 with frame title text-001.


  parameters: tabname  like databrowse-tablename memory id dtb.
  selection-screen skip.


  selection-screen end of block frm1.
*----------------------------------------------------------------------*
*  AT SELECTION-SCREEN                                                 *
*----------------------------------------------------------------------*
at selection-screen on value-request for tabname.


  perform f4_objname.


at selection-screen.


  select * from  dd02l
           where  tabname  = tabname
           and    as4local = 'A'
           and   ( tabclass  <> 'INTTAB' and tabname <> 'APPEND' and
                   tabclass  <> 'VIEW' ).
    exit.
  endselect.


  if sy-subrc <> 0.


    message e402(mo) with tabname.


  endif.


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


  IF tabname(1) <> 'Z'.
     message e000 with '당신은 권한이 없습니다'.
     EXIT.
  ENDIF.


  concatenate g_tabname tabname into g_tabname.


  dd02l-mainflag = 'X'.


  export action dd02l-mainflag global_auth
                to memory id mem_id.


  submit (g_tabname) via selection-screen and return.


 


*&---------------------------------------------------------------------*
*&      Form  CHECK_PASSWORD
*&---------------------------------------------------------------------*
*       패스워드 확인
*----------------------------------------------------------------------*
form check_password .


*  if not ( sy-uname = 'AAA01' or sy-uname = 'AAA02') .
   * message e000 with '당신은 권한이 없습니다'.
  *endif.


endform.                    " CHECK_PASSWORD
*&---------------------------------------------------------------------*
*&      Form  F4_OBJNAME
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
form f4_objname.


  data: l_dnum   like d020s-dnum,
        l_repid  like sy-repid.


  l_dnum = sy-dynnr.  l_repid = sy-repid.
  call function 'RS_HELP_HANDLING'
    exporting
      dynpfield                 = 'TABNAME'
      dynpname                  = l_dnum
      object                    = 'TB  '
      progname                  = l_repid
      suppress_selection_screen = 'X'.


endform.                    " F4_OBJNAME