cancel
Showing results for 
Search instead for 
Did you mean: 

keep old ABAP versions, ie in Git (?)

woutdejong
Participant

Hi experts,

We want to keep a record/snapshot of all old versions of ABAP / Dict objects of our Dev system, preferably accessible but not necessarily in a running SAP system. I know of old skool method in SAP note "130906", but this keeps it in a SAP system.

A Git repo (or repos) seems like a suitable to address this, either via ABAPgit or gCTS. However, I don't see a clear and easy route to do this. Anybody else wondering about this or similar, and having an idea how to set this up? Or having a completely different approach to address this ABAP versions snapshot requirement?

 

Cheers, Wout

woutdejong
Participant
0 Kudos

[wrong comment]

Accepted Solutions (0)

Answers (4)

Answers (4)

Karin
Product and Topic Expert
Product and Topic Expert

Hi Wout,

first of all: there is no officially supported way of using gCTS as a backup-tool.

The following is under the assumption that you would like to use CTS as the standard transport option within your landscape and gCTS as an additional backup-tool.

in the gCTS-App on the Objects tab, you can find an option to manually push objects to a Git repository. This manual push supports single objects, full packages and transport requests. So you can use it to add objects to a repository that are not pushed when you release a transport request. You can find the documentation for this in here https://help.sap.com/docs/ABAP_PLATFORM_NEW/4a368c163b08418890a406d413933ba7/bb01f567bd5344ffb627f7c...

To make sure that a pull from that repo in another system works, you have to make sure that the complete object ist available in the repository. Only partial objects will not work. So you should push the complete object at first.

For sure when you manually push a package, this will push the current version of the objects, not the first one or older ones. There is now way to make sure that via the manual push the latest version of your object is represented by the latest commit. the latest commit will consider the version of the object that had been pushen at last as the current one.

In addition, if you decide to use the manual push, you always have to do this manually when you create a new version (by pushing the transport request manually to the repo as well).

There would also be an option to implement a BAdI that pushes an object to a repository when releasing the transport request   - but this is not available as part of the standard delivery and you would need to do it as your own custom implementation. Maybe some parts of the coding provided in here could be re-used: 
https://github.com/SAP-samples/s4hana-gcts-badi

Hope this helps to shed some light on your question

Kind regards
Karin

woutdejong
Participant
0 Kudos

Thanks @Karin for your reply. 

Based on your info (and the gCTS course from a few years ago) I'm thinking along the lines of replaying *all* transports (we have all co/data files of the last 20 years, not sure if gCTS requires that) via Manual Push into one repo (master branch). Every transport corresponds to 1 commit. That will require some custom ABAP automation because of volume. 

Then do some scripting with git, like below, to get a nice linear timeline.

 

git commit --date=<transport release date> --amend

 

So we get a nice customizing and ABAP workbench "archive" of our current Dev system.

Should work right?

[edit]

No, it probably won't. Manual Push process uses Transport of Copies, and afaik a ToC of a very old transport does not respect the versions of objects (or customizing values) of that old transport.

Karin
Product and Topic Expert
Product and Topic Expert

Hi Wout,

you are right, in the UI, a ToC will be created when you push a transport request manually. To get the full history stored in the different transport requests that were created over the years into a git repository you would need to write a report or something alike and use the API.

Kind regads
karin

woutdejong
Participant
0 Kudos

Ah, I couldn't find any API Docs on https://help.sap.com/docs/ABAP_PLATFORM_NEW/4a368c163b08418890a406d413933ba7/f319b168e87e42149e25e13... , but browsing through classical ABAP did show a nicely structured set of ABAP Packages. @ttrapp  must be proud! 🙂

So I think I'm going to look at PIF_SCTS_ABAP_AND_VCS_FACADE and have a deeper look at CL_CTS_ABAP_VCS_TRANS_FACADE and others.

Karin
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Wout,

yes, we don't have any officially documented API. But maybe also the sample implementation for the registry in here https://github.com/SAP-samples/s4hana-gcts-badi could give some hints.

Kind regard
Karin

woutdejong
Participant
0 Kudos

[noticed the comments option, moved reply.]

woutdejong
Participant
0 Kudos

Hi @Karin and @larshp , hopefully you don't mind this mentioning to entice you to comment... Cheers, Wout

woutdejong
Participant
0 Kudos
abapGit route continues here: https://github.com/abapGit/abapGit/issues/6884