Skip to Content
Technical Articles
Author's profile photo Rameez Khan

Transport Request Check Tool

Introduction:

While many of us would like to simulate/check our transport request for error before we import the changes into production system, it becomes almost a necessity during big Go-Live’s / Release Management phase to sequence the transport request and check dependency between requests.

Although there are lot of solutions already been implemented like the followings

Home Made Transport Sequencer
Transport Checking Tool Object Level
Program to Simulate Transport Request

it is always best to use tools provided by SAP.

Solution:

With ST-PI component, SAP has delivered tcode /SDF/TRCHECK (program: /SDF/CMO_TR_CHECK) which makes sure errors of transport request gets detected before TR is imported to production system.

Refer to program documentation for details.

Lot more details can be found in

Note: 2475591
TR check tool

Idea:

Given that we have a solution doesn’t mean we end up using it to the best of its value. Hence it will be great to integrate this with SE10. 😉

I implemented BADI: CTS_REQUEST_CHECK to execute report: /SDF/CMO_TR_CHECK before releasing the transport request (method: CHECK_BEFORE_RELEASE) and then giving a pop-up to decide if I wish to continue to release the transport request.

Also I created a custom SET/GET parameter to ensure BADI calls report only when the user parameter is set to X.

To conclude:

Results are good 🙂

Identifies if objects are missing in production system.

Catches missing transport request.

Can be a life saver 🙂

 

Update 31st July 2020.

Code as follows:

"----------------------------------------------------- Data Declaration

DATA:
  lr_transports    TYPE RANGE OF e070-trkorr,
  lv_answer        TYPE char1,
  lf_perform_check TYPE xfeld.

CONSTANTS:
  co_none       TYPE rfcdes-rfcdest VALUE 'NONE',
  co_production TYPE rfcdes-rfcdest VALUE 'RFC_FOR_PROD'.

"--------------------------------------------------------- Logical Code

CLEAR: lf_perform_check.
"---- Get parameter to check if TR check should be executed.
"---- This is done to control which users should be able to use this
"---- feature. Also helpful to switch off for certain transports where
"---- note or too many objects are being sent. Timeout can occur.
GET PARAMETER ID 'CHECK_TR' FIELD lf_perform_check.
IF lf_perform_check IS NOT INITIAL.

  "----- Get main request
  SELECT SINGLE strkorr
    FROM e070
    INTO @DATA(lv_main_transport)
   WHERE trkorr EQ @request.
  IF sy-subrc IS NOT INITIAL.
    "--- No Main TR ???
    "--- Impossible..
    RAISE cancel.
  ENDIF.

  CLEAR: lr_transports[].
  "---- Collect TR in range
  APPEND VALUE #( sign = 'I' option = 'EQ' low = lv_main_transport )
  TO lr_transports.

  "--- Note: We have excluded/included certain options.
  "--- This is done for our requirement, you can select
  "--- any of the below based on your requirement.

  "--- Call report to check transport request
  SUBMIT /sdf/cmo_tr_check
    WITH p_source = co_none               "-- Source System
    WITH p_target = co_production         "-- Target System
    WITH r_prj_co = abap_true             "-- Check TR
    WITH p_ori_tr IN lr_transports           "-- Give TR number
    WITH p_crsref = abap_true             "-- Cross reference
  "-- WITH p_dgp    = abap_true         "-- Sequence Check
    WITH p_swcomp = abap_true             "-- Cross release
  "-- WITH p_imptim = abap_true         "-- Import Time in source
  "-- WITH p_oichck = abap_true         "-- Online import check
  AND RETURN.

  CLEAR: lv_answer.
  "---- Confirm from User if he wishes to release TR
  CALL FUNCTION 'POPUP_TO_CONFIRM'
    EXPORTING
      titlebar              = TEXT-a01 "-- Release Transport Request
      text_question         = TEXT-a02 "-- Continue to release TR ?
      display_cancel_button = abap_true
    IMPORTING
      answer                = lv_answer
    EXCEPTIONS
      text_not_found        = 1
      OTHERS                = 2.
  IF sy-subrc <> 0.
    CLEAR: lv_answer.
  ENDIF.

  IF lv_answer EQ '1'.
    "--- Release transport request
  ELSE.
    "--- Cancel release of TR
    RAISE cancel.
  ENDIF.
ENDIF.

Assigned Tags

      26 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Matthew Billingham
      Matthew Billingham

      "it is always best to use tools provided by SAP."

      No. Not always.

      Author's profile photo Florian Henninger
      Florian Henninger

      I really need to add that I like this transport checker, but in my opinion it's something which need to be integrated in a process and not at such a place.

      When people really care about releases and transports the tool is something which just make sure for the quality manager everything is really fine.

      Because just releasing the transport does not save you via "STMS", and that's just one example 😉

      Author's profile photo Rameez Khan
      Rameez Khan
      Blog Post Author

      With before_release method, we can identify errors before releasing the TR and stop the release. Then we can make corrections before releasing the TR itself.

      It might save from "STMS" in this case.

      Author's profile photo Bärbel Winkler
      Bärbel Winkler

      We are currently experimenting with /SDF/CMO_TR_CHECK as well but are looking for another option:

      • We usually have one transport day per week where changes make it into the productive systems.
      • Developers have to have those of their transports they want to have imported released from the QA-system by (high)noon on that day.
      • Shortly after noon a batch job fills the import queues
      • we have set up a batch job which runs shortly afterwards and executes /SDF/CMO_TR_CHECK following a step for program RSTMSCOL to refresh the queues (it would actually be good if the ST-PI program did just that at the beginning - or have the option to trigger it e.g. via another checkbox on the selection-screen)
      • The plan is to then have developers use program /SDF/CMO_TR_CHECK_HISTORY to look at the results and if need be provide missing transports to be manually added to the queue
      • The first imports into production happen 2 to 3 hours later into a system for Asia-Pacific countries giving us some wiggle-room for corrective measures.

      While experimenting with the program, we noticed that it did catch some issues which could then be corrected before hitting production.

      Cheers

      Bärbel

      Author's profile photo Rameez Khan
      Rameez Khan
      Blog Post Author

      Thank you for sharing the experience.

      Author's profile photo Bärbel Winkler
      Bärbel Winkler

      Here is an update: since January 2021 when upgrades happened for the ST-PI components, our weekly job is no longer working because it always abends when it wants to send a message to the GUI. I created an OSS-message but that has been lingering with some activity off and on without getting a solution in place. Some OSS-Notes were provided but none really helped - the job still gets cancelled with message "Control Framework: Fatal error - GUI cannot be reached". This happens after a couple of minutes runtime but it's not clear where and when because no dump is available in ST22.

      As we only have one short "window of opportunity" each week between noon and 3pm when import queues for production are filled and the check can be run meaningfully this has been consistently tricky to troubleshoot further both on our and SAP's end.

      If somebody has an idea of what we could try, I'm all ears!

      Cheers

      Bärbel

      Author's profile photo Jelena Perfiljeva
      Jelena Perfiljeva

      Today I learned that /SDF/TRCHECK exists. 🙂 We have a home-grown program with similar purpose but I've had some issues with it recently as it doesn't seem to work with the classes and SE91 messages. So this should be useful, I hope.

      Thanks for sharing!

      Author's profile photo Rameez Khan
      Rameez Khan
      Blog Post Author

      You are welcome ?

      Author's profile photo Fabian Berlin
      Fabian Berlin

      Hello Rameez

      thank you for sharing this information. The cross-reference check can be further integrated into SAP Solution Manager ChaRM: Cross Reference Check in ChaRM

      Regards

      Fabian

      Author's profile photo Rameez Khan
      Rameez Khan
      Blog Post Author

      Thank You Fabian for shedding more light on this.

      Author's profile photo Rameez Khan
      Rameez Khan
      Blog Post Author

      Thanks Abhijit for sharing information with us..

      We have also asked our team to note down the points related to this report.

      One of the points that I noted is that in a standard table if .INCLUDE structure is not yet implemented then the report gives error of object does not exist in target system which is quite confusing.

      Currently our plan is to observe report for a while and the we can submit all findings to SAP at once.

      Author's profile photo Suneetha Yanimineni
      Suneetha Yanimineni

      Rameez Khan

      Thanks for a nice blog, I was excited to try out this transaction., but I am greatly disappointed with the cross reference errors which makes this transaction almost obsolete for us. How did your team address this? Are you able to use this transaction? Any insights?

      Regards,
      Suneetha

       

      Author's profile photo Rameez Khan
      Rameez Khan
      Blog Post Author

      Hello Suneetha Yanimineni ,

      Can you please elaborate on "almost obsolete for us".

      Because we have already integrated this transaction with SE10 and it works very well for us. It checks for error before we could import them to  production system.

      Eg of some errors.

      1. Objects not in production system and not included in transport request which might give error after import.
      2. It helps us to identify missing transport request if any.
      3. It also helps us to sequence our transport request before importing to production.

      Let me know what problem's you are facing with this transaction in details.

      Thanks

      Rameez Khan

      Author's profile photo Suneetha Yanimineni
      Suneetha Yanimineni

      Hi Rameez Khan

      Its the same error that you mentioned on your previous comment.

      "One of the points that I noted is that in a standard table if .INCLUDE structure is not yet implemented then the report gives error of object does not exist in target system which is quite confusing." How did your team overcome with this?

      I have a report program which has CI include and in the current version of my program, I am not referencing any of the fields from the CI include, but the transport check tool shows me an error.

      Another instance is on the SD user exit enhancements. This transaction checks for all the cross reference objects and other enhancements and errors about other enhancements which will be moved later. I would not expect an error in this case too.

      Regards,
      Suneetha

      Author's profile photo Rameez Khan
      Rameez Khan
      Blog Post Author

      Hello Suneetha Yanimineni ,

      We are living with it, may be SAP will bring some fixes in future. Btw did you raise an OSS by any chance ?

      Thanks & Regards

      Rameez Khan

      Author's profile photo Norbert FrĂźhwein
      Norbert FrĂźhwein

      Thanks, very helpful if you want to clean up the import queue and have to examine hundreds of transports that never went productive.
      However, when processing a complete import queue, we still have an error, which we have not yet been able to get under control with OSS messages. It is called "Error in /SDF/TEAP_ENVI_ANA" (S1/333). Does anyone have the same problem ?

      Author's profile photo Vinay Y R
      Vinay Y R

      Hello Norbert,

      Try checking the RFC you are using.

      SOLMAN RFC like READ and TMW will not give this error, executing from Dev,QAS and PRD systems needs RFC with more authorizations.

      thanks and regards

      vinay

      Author's profile photo Thiyagarajan Raghuraman
      Thiyagarajan Raghuraman

      True. I too end up with same problem “Error in /SDF/TEAP_ENVI_ANA” . Does anyone got response from OSS. Appreciate if you could share.

      Thanks & Regards

      TRRaman

      Author's profile photo antonio galan
      antonio galan

      SAP released note 2851012. It should fix this error.

       

      Author's profile photo Vinay Y R
      Vinay Y R

      This is a RFC error Coming days error message will get better to understand reason.

      thanks

      vinay

      Author's profile photo Luis Esteban Moreno Ruiz
      Luis Esteban Moreno Ruiz

      Hi Rameez Khan

      Your idea is very useful, thank you very much to share this article with the SAP Community.

      I would like to know how could you execute the report /SDF/CMO_TR_CHECK? Did you use a batch input program?

      Thanks in advance.

      Esteban

      Author's profile photo Rameez Khan
      Rameez Khan
      Blog Post Author

      Hello Luis Esteban Moreno Ruiz ,

      I have updated the blog with code.

      Thanks

      Rameez

      Author's profile photo Shweta Jain
      Shweta Jain

      Hi Rameez,

      Can you share the code which you have used in se10 BADI, check before release to integrate it with SE10.

      Thanks in advance

      Author's profile photo Rameez Khan
      Rameez Khan
      Blog Post Author

      Hello Shweta Jain ,

      I have updated the blog.

      Thanks

      Rameez

      Author's profile photo Nitin Toraskar
      Nitin Toraskar

      This helps a lot. We integrated this SOLMAN, n our system. but I have a question on this-

      While comparing versions, does it consider 'indentation and comments' or ignore? because we think it considers and throws warning message.

      if it considers then is there any option to ignore 'indentation and comments'?

       

      Author's profile photo Vinay Y R
      Vinay Y R

      Hello Nitin,

      Cross reference check is more about missing objects and not comparing versions.

      If a transport is released and a object is not existing in target a error occurs , This can be checked before release using Cross ref check in report /sdf/cmo_tr_check .

      if you elaborate on comments and indentations , i will try to let know what i know about this check.

      thanks and regards

      vinay