Skip to Content
Author's profile photo Edo von Glan

Enhancement to Suppress Display of ChaRM-Generated Object Versions

Since we introduced Solution Manager ChaRM (Change and Request Management) as transport management tool, I was irritated because of the many additional versions of objects that are created, each time a test transport to the test system is released.

For unknown reasons, when a test transport is requested, ChaRM always creates a transport of copies containing _all_ objects from the main transport request (not only the changed ones from the newest transport task). This then triggers the creation of new versions of _all_ these objects, even if the majority of them has not been changed since the last version.

In our system landscape (and I suppose in many SAP customers’ system landscapes), the developments system is not equipped with good test data (let alone connections to all interface partners etc.), so we often have 10 test transports, before a change can be transported to the production the system. This, in turn, leads to a tenfold increase in the number of versions, which annoys me every time I use the version overview (see screenshot above).

After asking SAP for help with this issue (in this case without success), I helped myself by implementing an enhancement, which I want to share here. It suppresses the display of all ChaRM-generated versions that were created before the last production transport.

The enhancement is usually only needed in the development system, so you can implement it in a local ($)-package.

Position of the enhancement is include LSVRLF01, starting with line 70 (at the end of FORM READ_VERSIONS_FROM_DIR).

ENHANCEMENT 1  ZS_WB_REMOVE_TOC_VERSIONS.    "active version
  get parameter id 'ZS_NO_TOC_VERSIONS' field data(z_show_versions).
  if sy-subrc = 0 and z_show_versions is not initial.
    select trkorr, trfunction
      from e070
      for all entries in @vrs_dir_vrs[]
      where trkorr = @vrs_dir_vrs-korrnum
      into table @data(z_transports).
    check sy-subrc = 0.
    data z_is_after_last_p_transport type abap_bool value abap_true.
    loop at vrs_dir_vrs reference into data(z_version) where versno <> 0 and korrnum is not initial.
      read table z_transports with key trkorr = z_version->korrnum assigning field-symbol(<z_transport>).
      if sy-subrc = 0.
        if <z_transport>-trfunction <> 'T'.
          z_is_after_last_p_transport = abap_false.
        elseif z_is_after_last_p_transport = abap_false and <z_transport>-trfunction = 'T'.
          delete logvers_dir where versno = z_version->versno.
          delete vrs_dir_vrs using key loop_key.
        endif.
      endif.
    endloop.
  endif.
ENDENHANCEMENT.

In addition to implementing this implicit enhancement, you need to create the GET/SET-Parameter. Developers can then set the parameter to X to achieve filtering of the unwanted versions.

Note: this enhancement works just for the classical SAPGUI workbench, not for ABAP in Eclipse. I might look for a possibility to bring the same feature to the version overview in Eclipse.

Assigned tags

      4 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Edo von Glan
      Edo von Glan
      Blog Post Author

      I just found out, that there is already an SAP note that allows to suppress the creation of versions for transport of copies. This solves the problem (at least for the future - for the already created versions the enhancement is still useful 😉

      https://launchpad.support.sap.com/#/notes/2296271

      Author's profile photo Gábor Márián
      Gábor Márián

      AFAK this note only works if transport management is done via ChaRM. So your solution is still useful for non-ChaRM users relying on massive use of ToC's.

      Author's profile photo Edo von Glan
      Edo von Glan
      Blog Post Author

      From the text of the note, I assume it is independent of ChaRM.

      Maybe someone can try this out and leave a comment here.

      Author's profile photo Riccardo Escher
      Riccardo Escher

      Hi,

      nice. There is a second use case for your enhancement.

      We for example love to have versioning switched on also for the QA system (tp parameter VERS_AT_IMP=ALWAYS) and are irritated that ChaRM blows up the versioning database with identical versions.
      Here your enhancement is still welcome!

      Obviously a VERS_AT_IMP=OFTEN_NO_T would be highly appreciated - hello SAP, is somebody listening?