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

Problem while copying function modules..

Former Member
0 Likes
1,001

Hi,

I am trying to copy a function module called MRM_ENTRY_ERS to Z function module.

Now the problem is there are 6 performs inside the function module and again in those 6 performs there

are around 10s of performs.

So its really hectic to create includes for form-endform for all of those performs.

Is there a way that when I copy all those form-endform without creating includes for every perform ?

I mean is there some easier way to do it ?

Thanks.

Rajesh.

1 ACCEPTED SOLUTION
Read only

suresh_datti
Active Contributor
0 Likes
939

Hey once it is a Z function.. you can do whatever you want.. simply put the entire code in one Program if you don't like the way it is..

~Suresh

7 REPLIES 7
Read only

suresh_datti
Active Contributor
0 Likes
940

Hey once it is a Z function.. you can do whatever you want.. simply put the entire code in one Program if you don't like the way it is..

~Suresh

Read only

Former Member
0 Likes
939

Copy and create only which you want to modify. Do you want to modify all includes of FM ?

Read only

Former Member
0 Likes
939

If you are simply using the includes not changing, then you can use the standard includes in your main program. Let us say there INCLUDE1 and INCLUDE2 in which all your forms are there. You may need to change a form in INCLUDE1. So make a Z copy of that and make the changes. But use INCLUDE2 as it is in your main program.

Read only

Former Member
0 Likes
939

Hi,

YOu can also leave the includes out of your program and use:

perform <form> in program <program name>

But then the performs should be stand alone not using global parameters.

Kind regards, Rob Dielemans

Read only

Former Member
0 Likes
939

When you copy an ABAP/FM it gives you an option to copy the attached text, includes etc...if you select the particular option you can even copy the includes if needed..OR..surely you still use the standard ones if you do not require any changes !!

Regards

Anurag

Read only

Former Member
0 Likes
939

Hi Rajesh,

Which ever part of the code you dont want can be modifeied by you by introducing a Zinclude with the perform you want and wit the code change in the Zperform in that zinclude. Those performs which you dont need to change can be left as standard performs in standard includes and you need not change them.

Thank You!

Regards.

Sunmit

Read only

Former Member
0 Likes
939

Hi,

I think copy the total Function group MRMN of this FM (MRM_ENTRY_ERS) into new function group like ZMRMN.

Please go to SE80, select function group, enter MRMN, press enter. Select the Function group MRMN, press the right butoon, click copy option, now you enter the new function group like ZMRMN,click copy, then after you select the copy function module(only if you need to Z fm), given the Z FM name and then press copy button, then it copies the function module successfully

subbarao