Using abapgit to transfer code between ABAP on premises system and ABAP environment of SAP cloud platform

Time:2020-1-14

SAP ABAP consultants have all used saplink. 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 transmission between the two systems. At this point, saplink has its place.

Using abapgit to transfer code between ABAP on premises system and ABAP environment of SAP cloud platform

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

(1) Saplink is installed on both system a and system B, which is to create reports manually. Then copy the source code from the GitHub of saplink, and activate it
https://github.com/sapmentors…

(2) Execute saplink on system a to export the code you want to transfer to a local file.

(3) Execute saplink on system B to import the local file generated in the previous step.

Using abapgit to transfer code between ABAP on premises system and ABAP environment of SAP cloud platform

Saplink’s introduction article, there are too many on the network, this article will not repeat.

After the cloud era, the code version management of SAP cloud platform ABAP programming environment chooses git based on abapgit, an open source project.

Using abapgit to transfer code between ABAP on premises system and ABAP environment of SAP cloud platform

Let’s follow Jerry’s example to learn how to do it.

The scenario of Jerry’s example is that I developed some ABAP code in ABAP on premises system Ag3. I want to import the ABAP code on these on premises systems into the sap cloud platform ABAP environment through abapgit.

(1) First, go to the GitHub warehouse to find the source code of abapgit and copy it to the on premises system.

Using abapgit to transfer code between ABAP on premises system and ABAP environment of SAP cloud platform

Run the report after activation. The interface is as follows:

Using abapgit to transfer code between ABAP on premises system and ABAP environment of SAP cloud platform

(2) The ABAP code on the on premises system cannot be pushed directly to the ABAP environment of the sap cloud platform. A transit station is needed, which is the code warehouse on github.com. To do this, Jerry creates a new code warehouse: Test SAP ABAP cloud

Using abapgit to transfer code between ABAP on premises system and ABAP environment of SAP cloud platform

(3) Return to the abapgit report of on premises system, click the online hyperlink of the toolbar, and establish an association with the GitHub warehouse created in step 2.

Using abapgit to transfer code between ABAP on premises system and ABAP environment of SAP cloud platform

The above figure means that the newly created development package in the on premises system and the code in $zjerrypackage will be associated with the test SAP ABAP cloud warehouse of github.com.

Because no code has been created in my development package, there is no resource file related to ABAP code in abapgit except for the package description XML file.

Using abapgit to transfer code between ABAP on premises system and ABAP environment of SAP cloud platform

(4) Now I create a report of Hello world in the on premises system

Using abapgit to transfer code between ABAP on premises system and ABAP environment of SAP cloud platform

Go back to abapgit of on premises system, refresh, and you will see the ABAP report I just created.

Using abapgit to transfer code between ABAP on premises system and ABAP environment of SAP cloud platform

As you use the GIT client of MAC or windows, I first use abapgit to push the Hello World Report created by on premises system to github.com:

Using abapgit to transfer code between ABAP on premises system and ABAP environment of SAP cloud platform

Maintain a push comment, such as the first commit from Jerry’s abapgit:

Using abapgit to transfer code between ABAP on premises system and ABAP environment of SAP cloud platform

After the successful push, now the warehouse on GitHub can see the report code and push comment just pushed from the on premises system: the first commit from Jerry’s abapgit
https://github.com/i042416/te…

Using abapgit to transfer code between ABAP on premises system and ABAP environment of SAP cloud platform

(5) Now we can import the code from github.com warehouse into SAP cloud platform ABAP environment. Install the abapgit plug-in for ABAP development tools at eclipse.abapgit.org/updatesite

Using abapgit to transfer code between ABAP on premises system and ABAP environment of SAP cloud platform

After installation, open the abapgit view:

Using abapgit to transfer code between ABAP on premises system and ABAP environment of SAP cloud platform

Log in to the sap cloud platform ABAP programming environment and click the link button:

Using abapgit to transfer code between ABAP on premises system and ABAP environment of SAP cloud platform

Enter the warehouse address of github.com: https://github.com/i042416/te

Using abapgit to transfer code between ABAP on premises system and ABAP environment of SAP cloud platform

Specify that the package zjerry in the sap cloud platform ABAP environment stores the ABAP code from github.com:

Using abapgit to transfer code between ABAP on premises system and ABAP environment of SAP cloud platform

When we see the items marked as imported in the abapgit view, the import is successful. However, in the development package zjerry of ABAP environment of SAP cloud platform, I didn’t see the Hello World Report in the on premises system. What’s the matter?

Using abapgit to transfer code between ABAP on premises system and ABAP environment of SAP cloud platform

Originally, 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.

Using abapgit to transfer code between ABAP on premises system and ABAP environment of SAP cloud platform

In the sap cloud platform ABAP programming environment, if we want to simulate the reports created in the on premises environment se38, we can do this by creating an ABAP class that implements the interface if 65104; OO ﹐ ADT ﹐ classrun.

Right click the category and select run as ABAP application (console).

Using abapgit to transfer code between ABAP on premises system and ABAP environment of SAP cloud platform

I hope this article can deepen your understanding of the concept of code management in SAP cloud platform ABAP environment through git in the following figure. Thank you for reading.

Using abapgit to transfer code between ABAP on premises system and ABAP environment of SAP cloud platform

More reading

  • Jerry’s ABAP, Java and JavaScript
  • What ABAP developers should learn in the future
  • Jerry’s May Day holiday in 2017: ABAP implementation of eight classical sorting algorithms
  • Jerry’s collection of ABAP original technical articles
  • 300 lines of ABAP code to implement the simplest blockchain prototype
  • Use java + SAP cloud platform + SAP cloud connector to call functions in ABAP on Premise System
  • Consume ABAP on premise OData service in the cloud foundry environment of SAP cloud platform
  • ABAP vs Java, breaststroke vs freestyle
  • Talk about C language and ABAP
  • Use ABAP channel to develop some small tools to improve daily work efficiency
  • The boring things I did with ABAP
  • Don’t like SAP GUI? Try eclipse for ABAP development
  • Write and activate ABAP code with visual studio code
  • Did your ABAP program give Buddha light? Let’s try Jerry’s trick
  • Write the first ABAP program on the ABAP programming environment of SAP cloud platform
  • ABAP programming specification officially issued by SAP
  • Do you know the hidden functions of ABAP code inspector?
  • Are you still using ABAP for the secondary development of SAP products? Let’s understand this new concept of secondary development
  • The parasitic programming languages in ABAP NetWeaver
  • From a blog in SAP community, talk about the feelings behind the naming of SAP products
  • ABAP restful service development in the cloud
  • How to expose CDs view as OData service in ABAP programming environment of SAP cloud platform

To get more original articles of Jerry, please pay attention to the public number “Wang Zixi”:
Using abapgit to transfer code between ABAP on premises system and ABAP environment of SAP cloud platform

Recommended Today

Query SAP multiple database table sizes

Query SAP multiple database table sizes https://www.cnblogs.com/ken-yu/p/12973009.html Item code db02 Here are two approaches, In the first graphical interface, the results of the query data table are displayed in MB, and only one table can be queried at a time. SPACE—Segments—Detailed Analysis—Detailed Analysis  In the pop-up window segment / object, enter the name of the […]