Download and upload the ABAP code
In this blog post you will learn about how to download an ABAP program and upload into another SAP system using simple steps.
- Find the relevant program and its transport.
Transaction SE38 – Enter the program – Display-Utilities-Version-Version management – find the latest TR number.
- The TR should be downloaded into two file formats. One as Co file and another one as data files.
- 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”
- Go to the source system and enter transaction CG3Y
- 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
- 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
- Download the file to your drive.
- 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
- Bring these files to the system where you want to copy the code.
- Use the transaction CG3Z to upload the files in to SAP directories.
- The parameters would be,
- Do the same thing for Data files as well. Parameters would be,
- 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.
- This will give the list of transports which are queued in the system.
- In the menu – Extras – Other requests – Add – enter the Co file name and click on continue. For ex: K123456.ERD
- 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.
- In the menu, Request click on Import.
- 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.
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.
I don't think that the names of "cofiles" and "data" subdirectories can be customized. Yes for DIR_TRANS.
Again a duplicate blog post... In fact, merging both of them makes a complete blog post... And even in the mentioned blog post, there's a typo on "cofiles", written "cofile" 🙂
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:
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.
Thank you for the post. It helps me understanding more about what under the hood.
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.
i think it is not available at ECC6