SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Create Transport Request for Table Export



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Transport and Upgrade | Транспорт и Обновления
View previous topic :: View next topic  
Author Message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1639

PostPosted: Mon Feb 25, 2008 1:45 pm    Post subject: Create Transport Request for Table Export Reply with quote

Code:
report zexp_table_exp no standard page heading.
***********************************************************
* Create Transport Request for Table Export
*
*   This is freeware. Please read the terms of use.
*   Written by Urs Rohner, Rohner IT Consulting & Engineering
*
*   Contact Author: Urs Rohner
*
*
* History
*   Vers  Date                 Own  Remarks
*   ----  -------------------  ---  ------------------------------------
*   1.10  13th September 2000  rnr  initial version
*
***********************************************************

* Global shared
  tables:
    dd02l.

* Selection Screen
  parameters:
    table like dd02l-tabname obligatory.

* Globals
  data:
    user   like e070-as4user,
    ktext  like e07t-as4text,
    trkorr like e070-trkorr,
    e070   like e070,
    e07t   like e07t,
    e070c  like e070c,
    e071   like e071  occurs 1 with header line,
    e071k  like e071k occurs 1 with header line.


*
* P A I ( )
*
  start-of-selection.
    " check for table existence
    clear dd02l.
    select * from dd02l where tabname eq table and as4local eq 'A'.
    endselect.
    if dd02l is initial.
      message w208(00) with 'Table not found'(e01).
      leave program.
    endif.
     " check for table class, must be transparent
    if dd02l-tabclass ne 'TRANSP'.
      message w208(00) with 'Is not transparent'(e05).
      leave program.
    endif.

    " prepare transport request data
    user = sy-uname.
    ktext = 'Export Client &2 Table &1'(e00).
    replace '&1' with table into ktext.
    replace '&2' with sy-mandt into ktext.
    e071-pgmid = 'R3TR'.
    e071-object = 'TABU'.
    e071-obj_name = table.
    e071-objfunc = 'K'.
    append e071.
    e071k-pgmid = 'R3TR'.
    e071k-object = 'TABU'.
    e071k-objname = table.
    e071k-mastertype = 'TABU'.
    e071k-mastername = table.
    if dd02l-clidep eq 'X'.
      concatenate sy-mandt '*' into e071k-tabkey.
    else.
      e071k-tabkey = '*'.
    endif.
    append e071k.


*   " create new transport request
    call function 'TRINT_INSERT_NEW_COMM'
      exporting
        wi_kurztext       = ktext
        wi_trfunction     = 'K'
        iv_username       = user
      importing
        we_trkorr         = trkorr
        we_e070           = e070
        we_e07t           = e07t
        we_e070c          = e070c
      exceptions
        no_systemname     = 1
        no_systemtype     = 2
        no_authorization  = 3
        db_access_error   = 4
        file_access_error = 5
        enqueue_error     = 6
        number_range_full = 7
        invalid_input     = 8
        others            = 9.
    if sy-subrc is initial.
      call function 'TRINT_MODIFY_COMM'
        exporting
          wi_e070                        = e070
          wi_e07t                        = e07t
          wi_e070c                       = e070c
          wi_sel_e071                    = 'X'
          wi_sel_e071k                   = 'X'
          iv_no_namespace_check          = 'X'
        tables
          wt_e071                        = e071
          wt_e071k                       = e071k
        exceptions
          chosen_project_closed          = 1
          e070_insert_error              = 2
          e070_update_error              = 3
          e071k_insert_error             = 4
          e071k_update_error             = 5
          e071_insert_error              = 6
          e071_update_error              = 7
          e07t_insert_error              = 8
          e07t_update_error              = 9
          e070c_insert_error             = 10
          e070c_update_error             = 11
          locked_entries                 = 12
          locked_object_not_deleted      = 13
          ordername_forbidden            = 14
          order_change_but_locked_object = 15
          order_released                 = 16
          order_user_locked              = 17
          tr_check_keysyntax_error       = 18
          no_authorization               = 19
          wrong_client                   = 20
          unallowed_source_client        = 21
          unallowed_user                 = 22
          unallowed_trfunction           = 23
          unallowed_trstatus             = 24
          no_systemname                  = 25
          no_systemtype                  = 26
          others                         = 27.
      if sy-subrc is initial.
        message s368(00) with 'New Order is'(e02) trkorr.
      else.
        message e368(00) with
          'TRINT_MODIFY_COMM failed with RC'(e03) sy-subrc.
      endif.
    else.
      message e368(00) with
        'TRINT_INSERT_NEW_COMM failed with RC'(e04) sy-subrc.
    endif.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Transport and Upgrade | Транспорт и Обновления All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.