*&---------------------------------------------------------------------*
*& Report ZTRANSPORT_TABLE
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT ztransport_table.
DATA:
lv_request TYPE trkorr VALUE 'SYSXXXXXXX', "Change the value with your TR#
lt_e071 TYPE tr_objects,
lt_e071k TYPE tr_keys,
ls_e071 TYPE e071,
ls_e071k TYPE e071k,
lv_position TYPE ddposition,
lv_tabkey TYPE trobj_name,
"Define Internal Table and Workarea of Type the Table which Data we want to capture in TR
lt_t012k TYPE TABLE OF t012k
ls_t012k TYPE t012k.
"Fetch the data which we want to capture in TR
SELECT * FROM t012k INTO TABLE lt_t012k.
SORT lt_t012k BY bukrs hbkid hktid.
"Fill the workarea and append it in Internal Table
ls_e071-trkorr = lv_request.
ls_e071-as4pos = 1.
ls_e071-pgmid = 'R3TR'.
ls_e071-object = 'TABU'.
ls_e071-obj_name = 'T012K'.
ls_e071-objfunc = 'K'.
APPEND ls_e071 TO lt_e071.
CLEAR ls_e071.
CLEAR lv_position.
"Loop on the data and fill the E021K Table entry
LOOP AT lt_t012k INTO ls_t012k.
lv_position = lv_position + 1.
"Concatenate all the Key Values of the Table
CONCATENATE sy-mandt ls_t012k-bukrs ls_t012k-hbkid ls_t012k-hktid INTO lv_tabkey RESPECTING BLANKS.
ls_e071k-trkorr = lv_request.
ls_e071k-pgmid = 'R3TR'.
ls_e071k-object = 'TABU'.
ls_e071k-objname = 'T012K'.
ls_e071k-objfunc = 'K'.
ls_e071k-as4pos = lv_position.
ls_e071k-mastertype = 'TABU'.
ls_e071k-mastername = 'T012K'.
ls_e071k-tabkey = lv_tabkey.
APPEND ls_e071k TO lt_e071k.
CLEAR ls_e071k.
ENDLOOP.
*"to add entries to the transport request we call the following function module
call function 'TR_REQUEST_CHOICE'
exporting
iv_suppress_dialog = 'X'
iv_request = lv_request
it_e071 = lt_e071
it_e071k = lt_e071k.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
6 | |
4 | |
4 | |
3 | |
3 | |
2 | |
2 | |
2 |