2012 Jun 13 4:05 PM
Hi,
I am working on a program to capture the transports from various systems over the landscape into Solution manager system using RFC connections and a report.
I am not able to fetch Date and Time for the transports Reapplied, I am just getting the latest date and Time.
I used the function module 'TMS_TM_GET_HISTORY'.
Does any one know where the date and time of the reapplied transport is stored?
Thanks in Advance!
Regards,
Pranay Aitha.
2012 Jun 18 2:16 PM
2012 Jun 13 4:17 PM
Hi Pranay,
Please use below code:
CLEAR ls_request.
ls_request-trkorr = tr_no-low. "Transport request number
CALL FUNCTION 'TRINT_READ_REQUEST_HEADER'
EXPORTING
iv_read_e070 = 'X'
iv_read_e07t = 'X'
iv_read_e070c = 'X'
iv_read_e070m = 'X'
CHANGING
cs_request = ls_request
EXCEPTIONS
OTHERS = 1.
APPEND ls_request TO lt_request.
CALL FUNCTION 'TRINT_FOLLOW_STRKORR_BACKWARD'
CHANGING
ct_requests = lt_request.
CALL FUNCTION 'TRINT_FOLLOW_STRKORR_FORWARD'
CHANGING
ct_requests = lt_request.
.
Inside LT_REQUEST , you will get date and Time for the Request.
Best Regards,
Sachin
2012 Jun 18 1:46 PM
Hi Sachin,
Thank you for the answer.
I have tried this, but we get the latest date and time from E070 table. I want the old date and time i.e date and time of the transport imported initially.
Regards,
Pranay Aitha.
2012 Jun 18 1:56 PM
As far as I know such detailed timestamp information is only stored in the control file of each transport request, which you can read with function module STRF_READ_COFILE. In the return table TT_COFI_LINES, you can identify the imports via field FUNCTION = 'I'.
Thomas
2012 Jun 18 2:48 PM
Hi Pranay,
Please try below Code :
*-------------------------- Get information
CALL FUNCTION 'TR_READ_GLOBAL_INFO_OF_REQUEST'
EXPORTING
IV_TRKORR = GV_DESCR
IMPORTING
ES_COFILE = ES_COFILE.
* *------------------- Analyze
LOOP AT ES_COFILE-SYSTEMS INTO SYSTEM.
IF SYSTEM-SYSTEMID = P_PRP "Prodcuction system detaisl
LOOP AT system-steps INTO step.
LOOP AT step-actions INTO action.
gv_pdate = action-date
gv_ptime = action-time
ENDLOOP.
ENDLOOP.
ELSEIF SYSTEM-SYSTEMID = P_PEQ. "Quality system details
LOOP AT system-steps INTO step.
LOOP AT step-actions INTO action.
gv_qdate = action-date
gv_qtime = action-time
ENDLOOP.
ENDLOOP.
ENDLOOP.
2012 Jun 18 2:09 PM
usually i use FM TR_READ_GLOBAL_INFO_OF_REQUEST whcih return log of every export/import of the request.
CALL FUNCTION 'TR_READ_GLOBAL_INFO_OF_REQUEST'
EXPORTING
iv_trkorr = e070-trkorr
IMPORTING
es_cofile = es_cofile.
LOOP AT es_cofile-systems INTO system. " structure ctslg_system
" Here system-systemid
LOOP AT system-steps INTO step. " structure ctslg_step
LOOP AT step-actions INTO action. " structure ctslg_action
" Here action-date, time
ENDLOOP.
ENDLOOP.
ENDLOOP.
Regards,
Raymond
2012 Jun 18 2:16 PM