Steps to copy or rename existing programs in SAP

Copy an existing program in SAP


To Copy an existing program in SAP, follow the below steps.

1. Go to SE38
2. Enter the program that you need to copy.
3. Press the copy button in the toolbar or press CTRL+F5.

Screen shot to explain copying in ABAP editor


In the popup screen, enter the target program name. This copies the source program to target program.

Pop up to name the target program for copy in ABAP Editor
Once done, you get an another popup screen for the elements to be copied. Select the elements according to your requirement that is shown in the below screen shot.

Press Copy and the source program is copied to the target program with the program elements you selected.


Renaming an existing program 


To Rename an existing program in SAP, follow the below steps.

1. Go to SE38
2. Enter the program that you need to rename.
3. Press the rename button in the toolbar or press CTRL+F6.


It is same as explained above for the copying.


Here all the program elements are transferred to the target program.
Includes are not renamed but you could select it to rename the includes in the program.



For more Tutorials, visit ABAP Tutorials, Tips & Tricks and Certification Questions

How to link a Methods of a Class to SAP TCode?

Linking Class Methods to Transaction Code in SAP

You can create a transaction code linked to a public method o f a class.

You can also do it for local method defined in an ABAP program.

Goto SE93. 

Enter the transaction code you want to link to, Choose "Method of a class" option and click the Create button.


Image to How to create OO transaction in ABAP

By default, you will have Method to link from Class Builder which is a global class.
Enter the Class Name and Method in the input field. Choose the update mode as per your requirement.

Image to How to create a transaction code from Global Class in ABAP


If you want to link your Local method of class from an ABAP program which is a Local Class,
just uncheck the checkbox "OO transaction model"

This will include you with an option "Local in Program". Check it and enter your ABAP program name and then the class and method.

Image to How to create a transaction code from local Class in ABAP Report




For more Tutorials, visit ABAP Tutorials, Tips & Tricks and Certification Questions