Application Development 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: 

To Copy a SAP Standard Function Module

Former Member
0 Kudos

Hi All, I am working on a program. I have to copy a sap STANDARD FUNCTION MODULE. After that I have to make changes in one of the include. If I try to copy a function module, sap asks for the function group. Moreover, the include files remains as it is.

Is there any way I can copy a Function module with all the includes to z includes. (Like if we copy a SAP script, before copy, a dialog asks for copying of includes and also the z names for each one).

Thanks,

Shrinu

2 REPLIES 2

Former Member
0 Kudos

Instead of copying the individual function module use SE80 and copy the function group this will copy the group and all the includes. It will also ask you which function modules you want to copy and what you want the new name to be.

Regards

Mart

CreyJ
Participant
0 Kudos

hi,

if you want to change just one of the includes, i would use all the sap includes of the original function group (fg1) and just copy the include i want to change.

you could do it like this:

1. create a new function group(fg2) for your function module.

2. copy the subroutines-includes from the original function group main program to the new main program (just copy&paste). now all the original forms are available in your new function group.

3. replace the FUNCTION-POOL statement in the top include of the new function group (fg2) with the a INCLUDE statement for the top include of the SAP function group (fg1). now all the original definitions are available.

4. copy the function module to your new function group by se37.

5. copy and change only your desired subroutine.

greetings juergen