Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use abap Git to transfer code in ABAP On-Premises system

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the knowledge of "how to use abap Git to transfer code in ABAP On-Premises system". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Friends of SAP ABAP consultants should have used SAPLink as a tool. If the two ABAP Netweaver systems do not establish a transmission path, we cannot use the standard SE10 transaction code to create a transmission request for code transfer between the two systems. At this point, SAPLink has the opportunity to display his talents.

SAPLink is simply a collection of reports and a series of plug-ins. If we expect to transfer code between systems An and B, the steps are:

(1) install SAPLink on both system An and B, that is, create the report manually, then copy the source code from the github of SAPLink, and activate it:

Https://github.com/sapmentors/SAPlink

(2) execute SAPLink on system A to export the code you want to transfer into a local file.

(3) execute SAPLink on system B and import the local file generated in the previous step.

There are too many introduction articles about SAPLink on the Internet, so I won't repeat them in this article.

After the cloud era, the code version management of SAP cloud platform ABAP programming environment chose GIT based on abapGit, an open source project.

Let's follow Jerry to learn how to do it through a simple example.

The scenario of the Jerry example is that I developed some ABAP code in the ABAP On-Premises system AG3. I want to import the ABAP code from these On-Premises systems into the SAP Cloud Platform ABAP environment through abapGit.

(1) first of all, go to the Github warehouse to find the abapGit source code and copy it to the On-Premises system.

Run the report after activation, with the following interface:

(2) the ABAP code on the On-Premises system cannot be directly pushed to the ABAP environment of the SAP cloud platform. You need a transit station, that is, the code repository on the http://github.com. To do this, Jerry builds a new code repository: test-sap-abap-cloud.

(3) go back to the abapGit report of the On-Premises system, click the Online hyperlink of the toolbar, and establish an association with the Github repository created in the second step.

The figure above means that my newly created development package in the On-Premises system, the code in $ZJERRYPACKAGE, will be associated with http://github.com 's test-sap-abap-cloud repository.

Since no code has been created in my development package, no resource files related to the ABAP code are displayed in abapGit except the package description XML file.

(4) now I randomly create a Hello World report in the On-Premises system:

Go back to the abapGit of the On-Premises system, refresh, and you can see the ABAP report I just created.

Just like you use the Mac or Windows version of the Git client, I first use abapGit to push the Hello World report created by the On-Premises system to github.com:

Casually maintain a push comment, such as the first commit from Jerry's abapgit:

After the successful push, the warehouse on github can now see the report code and push comments just pushed from the On-Premises system: the first commit from Jerry's abapgit

Https://github.com/i042416/test-sap-abap-cloud

(5) now we can import the code from the http://github.com repository into the SAP cloud platform ABAP environment. Install the abapGit plug-in for ABAP Development Tools at: http://eclipse.abapgit.org/updatesite

After the installation, open the abapGit view:

Log in to the SAP Cloud Platform ABAP programming environment and click the Link button:

Enter the warehouse address of github.com: https://github.com/i042416/test-sap-abap-cloud

Specify ZJERRY in the ABAP environment of SAP cloud platform to store the ABAP code from http://github.com:

Clipboard18,18

When we see an entry marked as Imported status in the abapGit view, the import is successful. However, in the development package ZJERRY of SAP cloud platform ABAP environment, I don't see the Hello World report in On-Premises system. What's going on?

It turns out that in the SAP Cloud Platform ABAP environment, there are only five carriers that allow developers to write ABAP code, which do not support ABAP reports created through SE38 in the On-Premises environment. If we create an ABAP class in the On-Premises system, through the steps described in this article, we can successfully import the SAP cloud platform ABAP environment and continue to develop on it.

In the SAP cloud platform ABAP programming environment, if we want to simulate the report created in the On-Premises environment SE38, we can do this by creating an ABAP class that implements the interface IF_OO_ADT_CLASSRUN.

Right-click the class and select Run As ABAP Application (Console).

This is the end of the introduction of "how to use abap Git for code transmission in the ABAP On-Premises system". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report