abaptransportsap-basis

Retrieving Object names and Transfer requests for an entire package programmatically


I have two separate system (development and testing) and I need to check that for all my objects (programs and all includes) the version in development matches that in dev. I can do this manually by going to SE80 -> Utilities -> Version Management for each object but for hundreds/thousands of objects this is extremely time consuming.

Is there a way to retrieve the object name and TR programatically so that they could be output to a table or spreadsheet?

EDIT. (Vwgert it seems to me like this works - if it doesn't could you explain a bit more why it won't? Thanks)

So using the following JOIN I believe I am able to retrieve all the objects, types and latest TR in the system.

SELECT a~obj_name b~korrnum c~object b~datum b~zeit
  FROM tadir AS a
  INNER JOIN vrsd AS b
  ON a~obj_name = b~objname
  INNER JOIN e071 AS c
  ON a~obj_name = c~obj_name
  AND a~pgmid = c~pgmid
  AND a~object = c~object
  INTO TABLE gt_obj_tr
  WHERE a~devclass IN s_pkg.

SORT gt_obj_tr BY object ASCENDING obj_name ASCENDING korrnum DESCENDING datum DESCENDING zeit DESCENDING.
DELETE ADJACENT DUPLICATES FROM gt_obj_tr COMPARING object obj_name.

Solution

  • You can find most of the object headers in the table TADIR. The request and task headers are stored in E070, the entries in E071 - just take a look at the contents, it's fairly self-explanatory if you know what a transport looks like. Be aware that some object types can be transported partially (R3TR CLAS is the entire class, LIMU METH is only a single method) - this makes direct joins impossible.