‎2009 Oct 21 4:07 PM
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
‎2009 Oct 21 4:18 PM
>
> 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
‎2009 Oct 21 4:18 PM
>
> 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
‎2009 Oct 21 4:26 PM
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.
‎2009 Oct 21 4:47 PM
Try a combination of READ REPORT and INSERT REPORT statements.
Thomas
‎2009 Oct 21 4:51 PM
What about debugging the standard SAP functionality of "Copy Program" ?
BR,
Suhas
‎2009 Oct 21 4:52 PM
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
‎2009 Oct 22 8:00 AM
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.
‎2009 Oct 22 8:10 AM
Hi,
Try using function module RS_COPY_PROGRAM
Check the documentation for details
Regards
‎2009 Oct 22 8:37 AM
> Try using function module RS_COPY_PROGRAM
This should work much better, so please ignore my previous suggestion.
Thomas
‎2009 Oct 22 8:38 AM
‎2009 Oct 23 9:13 AM