02-07-2016 6:29 PM
Hey experts,
is there some FM with which I can include a XPRA into transport request by code?
I usually use the following FM to include objects into TR, but it does not work for XPRA.
CALL FUNCTION 'RS_TOOL_ACCESS'
EXPORTING
operation = 'TRANSPORT'
TABLES
objlist = lt_objlist
CHANGING
p_request = lg_request
EXCEPTIONS
invalid_object_type = 01
not_executed = 02
OTHERS = 03.
Thank you.
Best regards,
Robert
02-08-2016 7:46 AM
Try TR_OBJECTS_CHECK followed by TR_OBJECTS_INSERT.
wa_ko200-pgmid = 'R3TR'.
wa_ko200-object = 'XPRA'.
wa_ko200-obj_name = wi_progname.
APPEND wa_ko200 TO lt_trans.
CALL FUNCTION 'TR_OBJECTS_CHECK'
IMPORTING
we_order = we_order " already locked in this transport
TABLES
wt_ko200 = lt_trans
EXCEPTIONS
cancel_edit_other_error = 1
show_only_other_error = 2
OTHERS = 3.
* CHECK we_order IS INITIAL.
* CHECK sy-subrc = 0.
CALL FUNCTION 'TR_OBJECTS_INSERT'
EXPORTING
wi_order = wi_order
iv_no_show_option = ' '
TABLES
wt_ko200 = lt_trans
EXCEPTIONS
cancel_edit_other_error = 1
show_only_other_error = 2
OTHERS = 3.
Regards,
Raymond
02-08-2016 5:14 PM
Hey Raymond,
It does not work
My exact code is the following:
REPORT YOCT_TEST.
data: wa_ko200 type ko200,
lt_trans type STANDARD TABLE OF ko200,
we_order type e070-trkorr,
wi_order type e070-trkorr.
wi_order = 'TIEK900138'.
wa_ko200-pgmid = 'R3TR'.
wa_ko200-object = 'XPRA'.
wa_ko200-obj_name = 'YOCT_XPRA'.
APPEND wa_ko200 TO lt_trans.
CALL FUNCTION 'TR_OBJECTS_CHECK'
IMPORTING
we_order = we_order " already locked in this transport
TABLES
wt_ko200 = lt_trans
EXCEPTIONS
cancel_edit_other_error = 1
show_only_other_error = 2
OTHERS = 3.
CHECK we_order IS INITIAL.
CHECK sy-subrc = 0.
CALL FUNCTION 'TR_OBJECTS_INSERT'
EXPORTING
wi_order = wi_order
iv_no_show_option = ' '
TABLES
wt_ko200 = lt_trans
EXCEPTIONS
cancel_edit_other_error = 1
show_only_other_error = 2
OTHERS = 3.
CHECK sy-subrc = 0.
After I run it, it finish every FM with return code 0, but the TIEK900138 workbench TR is still empty what am I doing wrong?
Regards,
Robert