Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Copy a method

Former Member
0 Likes
4,768

Hi experts,

How can we copy a metod inside a object.i need to copy

a method price_check from the obejct(z_bus2081) into z_price_check (z_bus2081)

3 REPLIES 3
Read only

Former Member
0 Likes
1,813

Hi Karthick

SE80, use Class library option, enter class method and click on copy to...

regards,

Arun

Read only

Former Member
0 Likes
1,813

Hi

Hope that you want to copy a method of a particular class.

Following are the simple and easier steps to make a Std SAP method customized.

Goto the required method(using SE24 tcode).

In the function keys section, there will be an icon for Other object, on clicking it a pop-up screen appears.In this screen at the bottom there will be an icon for 'Copy'.

On clicking the 'Copy' icon, it will open another pop-up window again and asks where to copy the method(here we can specify a Z method name) in the

To' section.

On pressing continue, the Z method will be created and stored under the speified name. We can then activate the method.

By this way, we can easily make the customized version of a standard SAP object.

Read only

Former Member
0 Likes
1,813

Hello Karthick,

inside the class I copy the methods (in 4.6C, but not only) like:


1. set cursor on choosen method, which you want to copy
2. push button 'Copy', just over the description
3. set cursor in the wish line in the methods listing
4. push button 'Paste', just over the description
5. the copied method (with pasrameters and exceptions)
    has the name 'COPY_1_OF_your_copied_meth',
    which you can afterwards change.

Greetings,

Peter