Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

STMS Transport REAPPLIES not visible in E070

pranay_aitha2
Participant
0 Kudos
247

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.

1 ACCEPTED SOLUTION

ThomasZloch
Active Contributor
0 Kudos
102

Mine has the simpler return structure

Thomas

6 REPLIES 6

former_member213851
Active Contributor
0 Kudos
102

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

0 Kudos
102

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.

0 Kudos
102

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

0 Kudos
102

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.

raymond_giuseppi
Active Contributor
0 Kudos
102

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

ThomasZloch
Active Contributor
0 Kudos
103

Mine has the simpler return structure

Thomas