Skip to Content
Technical Articles

Download and upload the ABAP code

Dear all,

In this blog post you will learn about how to download an ABAP program and upload into another SAP system using simple steps.

  1. Find the relevant program and its transport.

Transaction SE38 – Enter the program – Display-Utilities-Version-Version management – find              the latest TR number.

  1. The TR should be downloaded into two file formats. One as Co file and another one as data files.
  2. These files are stored in SAP directory. Use the transaction AL11 and the go to the directory parameter DIR_TRANS and it will have a directory /usr/sap/trans. Inside that we can see  two subfolders called “Cofiles” and “datafiles”
  1. Go to the source system and enter transaction CG3Y
  2. From the TR number, remove the prefix of server name. For Example, if the TR number is ERDK123456, just enter K123456. Enter the source path as /usr/sap/trans/cofiles/K123456.ERD
  3. The destination file path would be your local drive. Make sure you follow the below format for the file name. K123456 followed by Server name followed by DAT. So, the destination file name would be K123456.ERD.DAT

  1. Download the file to your drive.
  2. Do the above mentioned 3 steps to download the Data files.  Data files Prefix will be R instead of K. So the download parameter would be

  1. Bring these files to the system where you want to copy the code.
  2. Use the transaction CG3Z to upload the files in to SAP directories.
  3. The parameters would be,
  4. Do the same thing for Data files as well. Parameters would be,
  5. We need to import these files as a Transport request. Go to the transaction STMS- click on import overview – double click on target system name.
  6. This will give the list of transports which are queued in the system.
  7. In the menu – Extras – Other requests – Add – enter the Co file name and click on continue. For ex: K123456.ERD
  8. Now the file has been added to the import queue as a Transport. If you refresh the screen, you can see the Transport in the list.
  1. In the menu, Request click on Import.
  2. Choose immediate import and in the options make sure that all boxes are unchecked.

After these steps, you will see your program in the target system!

 

Limitation: If the program is having any FM /Method /table definition which is used in the program but stored in the different Transport, it is not automatically copied. You need to download all the relevant transports using the above said method.

 

Please let me know if you need further information on this.

 

8 Comments
You must be Logged on to comment or reply to a post.
  • Thank you for this interesting blog post. There’s a little typo about the subdirectory “datafiles”, it should be “data”. Note that CG3Y/CG3Z only exist in SAP ERP systems (ECC, S/4HANA), in other systems a FTP client could be used (or develop a custom ABAP tool).

    • I think that directory names could actually differ, at least it happened to me before (as I noted in the comment to an older blog on this same subject). Not sure if it was just an odd choice by the Basis folks or something else influenced it but we had 2 SAP systems, both ECC and hosted by the same provider on the same OS, etc. And for some reason they had different physical names for DIR_TRANS directory.

        • Not going to argue on this, don’t have access to that system anymore and am not sure what exactly was he deal there. I just remember that I needed to copy the same files into two SAP systems but had to use different path names for some reason. It was mildly annoying since I couldn’t just copy-paste. 🙂

          P.S. There are actually multiple blogs with the same steps, I posted a separate comment below.

  • Thanks for this interesting blog. Please note 3 things:

    • This and similar approaches work for every type of transportable object, not just for ABAP code.
    • This approach may circumvent the CTS (Correction and Transport System) and its safety and security measures. So in a productive environment, Systems Admin has probably blocked it. Still, it is an alternative to move stuff between sandboxes for trial and testing purposes.
    • Last, for ABAPGit geeks there are other ways… but that would be another blog entirely, which I’m sure can be found in this forum.
  • The problem with this approach is that it generally involves the BASIS department, and the code when it arrives in the target system is “foreign” and cannot be changed without the modification assistant, or changing the object directory entry.

    That being said, transports are generally how updates to third party commercial add-ons are installed.

    For open source Z code, things like SAPLINK and AbapGit are the way to go.

    Cheersy Cheers

    Paul

     

     

  • Nice effort but the title is slightly misleading. This is about upload/download of the transport files, which could include other objects (e.g. dictionary elements).

    This subject has already been well covered in other SCN blogs:

    Upload a SAP Transport Request – Made Easy – this was posted just a few months ago, covers the same exact steps but offers more information. More accurate title too.

    Step by Step Instruction on How to Transfer Request to External System – same thing from 2016

    How to download / upload transport request from / to a server – 2013

    How to Manually import transports into SAP without using command line TP – this is vintage 2012 blog that I used long time ago, as evident from the comments. There were a few even older ones but that one was most detailed.