‎2006 Mar 20 2:43 PM
Hi all,
Can anyone please explain me how Do I copy script standard program. Say for example I want to modify the program sapfm06p of PO. Now I want to copy the program as well as it's includes and do some manipulations as per my requirement. Can anyone exlain me in detail how do I achieve that. Also IN a script , If there are two pages can I have two page formats say DINA4 for first and legal for page two.
Regards,
Varun.
‎2006 Mar 20 2:45 PM
Hi varun,
1. goto se38
type the program name
(dont go to sourc code, stay in the initial screen)
2. now
PROGRAM -
> COPY
3. a small window will come.
there u can specifiy what-what to copy !
4.
there are two pages can I have two page formats say DINA4 for first and legal for page two.
I don't think its possible.
regards,
amit m.
‎2006 Mar 20 2:45 PM
Hi varun,
1. goto se38
type the program name
(dont go to sourc code, stay in the initial screen)
2. now
PROGRAM -
> COPY
3. a small window will come.
there u can specifiy what-what to copy !
4.
there are two pages can I have two page formats say DINA4 for first and legal for page two.
I don't think its possible.
regards,
amit m.
‎2006 Mar 20 2:55 PM
Hi Amit,
Thanks for the reply. But the problem if I copy like that is the includes get copied but the function modules do not get copied where in I need to modify the code. I heard that it can be done from tcode se80 copying the function group. Can you please explain me how it can be achieved in that way.
Regards,
Varun.
‎2006 Mar 20 3:02 PM
Hi
I think you mean you need to copy the fm to print PO, i.e: ME_PRINT_PO and ME_READ_PO_FOR_PRINTING.
If it's so, you have to copy the function group MEDRUCK and after you need to copy the std program sapfm06p to replace the calling of those std fms with your Z-functions.
Max
‎2006 Mar 20 3:04 PM
‎2006 Mar 20 3:23 PM
If it is all about PO output. then we should go with the
subroutine pool "SAPFM06P" then go to the Incoude "FM06PE02", it includes the function calls for all the above discussed. Then if you need to change the function module code copy the function group "MEDRUCK" INCLUDE only the copied z-function modules.
That solves the problem.
‎2006 Mar 20 4:04 PM
Hi Rich,
I copied the proram from se38 an function group from se80 and used the same in nace settings and the program wored for me. So far this is fine . Now I want to change the code in one of the include in the new functon group say I want to modify code in the include LMEDRUCKF0C. It is in the program saplmedruck, in the include LMEDRUCKF01. I want to insert some lines of code into that. Can you please explain me how do I achhieve that ?
Regards,
Varun.
‎2006 Mar 20 4:07 PM
Now you need to copy the include into a "Z" include and INCLUDE it in the main program of the function group, comment out the standard INCLUDE.
<b>* INCLUDE LMEDRUCKF0C . " READ_ADDRESS
INCLUDE LZMEDRUCKF0C . " READ_ADDRESS</b>
INCLUDE LMEDRUCKF0B . " READ_DATA_FROM_DB
INCLUDE LMEDRUCKF0A . " TMSI2_LESEN
INCLUDE LMEDRUCKF09 . " PROTOCOL_UPDATE
INCLUDE LMEDRUCKF08 . " EKET_EKES_ABMISCHEN
INCLUDE LMEDRUCKF07 . " PRUEFEN_MAHNUNG
INCLUDE LMEDRUCKF06 . " XEKPO_BEREINIGEN
INCLUDE LMEDRUCKF05 . " XAEND_BEREINIGEN
INCLUDE LMEDRUCKF04 . " ERGAENZEN_XAENDIn the main program SAPLZMEDRUCK......
*******************************************************************
* System-defined Include-files. *
*******************************************************************
INCLUDE LZMEDRUCKTOP. " Global Data
INCLUDE LZMEDRUCKUXX. " Function Modules
*******************************************************************
* User-defined Include-files (if necessary). *
*******************************************************************
* INCLUDE LMEDRUCKF... " Subprograms
* INCLUDE LMEDRUCKO... " PBO-Modules
* INCLUDE LMEDRUCKI... " PAI-Modules
<b>INCLUDE LZMEDRUCKF01.
*INCLUDE LMEDRUCKF01.</b>
INCLUDE LZMEDRUCKF02.
*INCLUDE LMEDRUCKF02.
INCLUDE LZMEDRUCKF1S.
*INCLUDE LMEDRUCKF1S.
INCLUDE LZMEDRUCKE01.
*INCLUDE LMEDRUCKE01.
Regards,
Rich Heilman
Message was edited by: Rich Heilman
‎2006 Mar 20 4:08 PM
Hi varun,
Copy even the includes into Z-includes & change the include names in the main program to z-includes(you can comments & add them). like copy LMEDRUCKF0C in to a ZLMEDRUCKF0C include & do the changes.
‎2006 Mar 20 4:13 PM
u need to copy LMEDRUCKF01 into a zprogram first n then within it change the include to ZLMEDRUCKF0C ( after copying LMEDRUCKF0C to a z program )..hereafter u can do modifications in it.
Hope it helps,
Regards,
Bikash
‎2006 Mar 20 4:16 PM
Hi Rich,
The program you specified in the reply is saplzmedruck where as the standard is saplmedruck. How did you copy saplmedruck to saplzmedruck ? I tried to that using se38 but I think that is not the right manner to copy this program.
Regards,
Varun.
‎2006 Mar 20 4:20 PM
When you copied the function group, this program is copied automatically, it is the main program of the function group. Go into SE80, enter ZMEDRUCK, change pull down to Function Group. Hit enter. Double click on the function group name, you will get a dialog, click on "Main Program". There you will see the source for the main program of the function group.
Regards,
Rich Heilman
‎2006 Mar 20 4:38 PM
Hi Rich,
Thank you very much. My problem is solved. Also I am awarding points to all the friends who tried to help me.
Regards,
Varun.