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

How to copy a program by a program ?

Former Member
0 Likes
1,155

Hello .

I created a classic program: ZTEST (by se38). ( Inside there some easy line code ).

I want create ZTEST2 as a copy of ZTEST. I have to do it by another program. I mean that inside my program ZMAIN(for exemple) I want to put some code to create ZTEST2 as a copy of ZTEST.

Any idea ?

tks.

Edited by: Roberto Baldassarre on Oct 21, 2009 5:13 PM

1 ACCEPTED SOLUTION
Read only

former_member191735
Active Contributor
0 Likes
1,024

>

> Hello .

>

> I created a classic program: ZTEST (by se38). ( Inside there some easy line code ).

>

> I want create ZTEST2 as a copy of ZTEST. I have to do it by another program. I mean that inside my program ZMAIN(for exemple) I want to put some code to create ZTEST2 as a copy of ZTEST.

>

> Any idea ?

>

> tks.

>

> Edited by: Roberto Baldassarre on Oct 21, 2009 5:13 PM

What? couldnt understand properly. .... post it clearly? You want to copy a program into another from custom program .... is it right?

if not , Just copy your zTEST to ZTEST2 and change it... if i understood correctly.

If yes, create a BDC on SE38 ..... may be

Edited by: Sampath Kumar on Oct 21, 2009 9:18 AM

10 REPLIES 10
Read only

former_member191735
Active Contributor
0 Likes
1,025

>

> Hello .

>

> I created a classic program: ZTEST (by se38). ( Inside there some easy line code ).

>

> I want create ZTEST2 as a copy of ZTEST. I have to do it by another program. I mean that inside my program ZMAIN(for exemple) I want to put some code to create ZTEST2 as a copy of ZTEST.

>

> Any idea ?

>

> tks.

>

> Edited by: Roberto Baldassarre on Oct 21, 2009 5:13 PM

What? couldnt understand properly. .... post it clearly? You want to copy a program into another from custom program .... is it right?

if not , Just copy your zTEST to ZTEST2 and change it... if i understood correctly.

If yes, create a BDC on SE38 ..... may be

Edited by: Sampath Kumar on Oct 21, 2009 9:18 AM

Read only

0 Likes
1,024

Hello,

I try to give more details:

I have a program: ZTEST.

I want a copy of ZTEST. I want name this copy ZTEST2.

I want to do this operation not by se38 -> copy, BUT by another program.

I mean that I need a command to use inside a program to create ZTEST2 by ZTEST!!!

Any idea ?

tks.

Read only

0 Likes
1,024

Try a combination of READ REPORT and INSERT REPORT statements.

Thomas

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,024

What about debugging the standard SAP functionality of "Copy Program" ?

BR,

Suhas

Read only

0 Likes
1,024

Hello,

You can have a look at the function module RFC_ABAP_INSTALL_AND_RUN.

You can integrate this routine in your program.

You can get the source code of the initial program with the function module RFC_READ_REPORT or with the ABAP statement READ REPORT INTO table.

Wim

Edited by: Wim Van den Wyngaert on Oct 21, 2009 5:53 PM

Read only

0 Likes
1,024

Hello,

tks for you reply. I tried INSERT REPORT and I create a new report. Anyway I don't understand what kind of report I created:

On the property there's: D$S without data base ; if I delete it, the system ask me to create a chage request, but on creation not !!!

Do you give me more information!

Tks,

Roberto.

Read only

0 Likes
1,024

Hi,

Try using function module RS_COPY_PROGRAM

Check the documentation for details

Regards

Read only

0 Likes
1,024

> Try using function module RS_COPY_PROGRAM

This should work much better, so please ignore my previous suggestion.

Thomas

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,024

Count me in ...

Read only

0 Likes
1,024

tks Rajvansh Ravi