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

Duplicate Function Modules

Former Member
0 Likes
3,106

This is quite a complicated problem and Iu2019ve tried to simplify a bit.

I created a custom FM (Z_FM_1) in a custom function group. When I try to activate it, I get a syntax error u201CINCLUDE LZRB1$11 - A function already exists with the name Z_FM_2. (Note that itu2019s not the one Iu2019m creating.) I go to the main program, and there is an include for the FM Z_FM_2, but itu2019s in include LZRB1U11, where one would expect it to be. So I open up the ABAP editor and look at include LZRB1$11 and indeed, there is a FM with that name there with just some odd code for importing and exporting parameters..

A where used list of that include shows that it is not actually used anywhere.

So far, this is odd enough, but when I go to our QA environment, I find exactly the same situation u2013 same includes, same FMs (except for the one Iu2019m trying to create). But if I do a syntax check, I get no error.

I canu2019t explain this. Can anyone??

Hereu2019s some further information that I donu2019t think is relevant, but still odd: I am creating this FM (Z_FM_1) because it exist in our QA environment, but not in DEV. I had tried to recreate it using version management, but there were no versions either for the FM or its include. When I looked at the code that was executing it, it had a different transport than the latest one. I looked at the transport log for the latest two requests and found that they had been exported in the correct sequence (older, then later), but the older one was in QA.

Rob

1 ACCEPTED SOLUTION
Read only

vijaymanikandan
Contributor
0 Likes
2,395

Hello Rob

I have faced similar kind of problem and what I did to solve was to re-transport the whole function group from either QA or from Prod. Later I was able to create my custom Function Groups. In my case we had 2 different dev systems which caused some confusion. If you are OK then you can import back the FG from QAS to DEV.

Regards,

Vijay V

8 REPLIES 8
Read only

naimesh_patel
Active Contributor
2,395

Rob,

I had faced not same but similar problems with Function Modules and groups when TR were migrated to created temporary systems. I used the repair FG option to fix that.

You can find the Repair Function Group option in SE37 > Utilities > Repair Function Group. Enter your FG name in the popup. In the next screen it would show if there are any issues with the FG. System would show includes which has issues and can be repaired. Select them and press Repair.

After this you should be able to create the FM.

Regards,

Naimesh Patel

Read only

0 Likes
2,395

Thanks Naimesh - I gave it a try. Unfortunately, it deleted the FM that I had just created and left the odd one alone.

Rob

Read only

0 Likes
2,395

Looks like odd is winning over the good one. Try Repairing again before creating the FG. Create the FM and try repair again. I know it is just a try ...

Regards,

Naimesh Patel

Read only

0 Likes
2,395

Actually, I did that before responding.

It's a real mess.

Rob

Read only

vijaymanikandan
Contributor
0 Likes
2,396

Hello Rob

I have faced similar kind of problem and what I did to solve was to re-transport the whole function group from either QA or from Prod. Later I was able to create my custom Function Groups. In my case we had 2 different dev systems which caused some confusion. If you are OK then you can import back the FG from QAS to DEV.

Regards,

Vijay V

Read only

0 Likes
2,395

Not really sure if that would work - the problem FM is in an include that is not included in the main program of the function group. A where used list shows nothing.

I am thinking of trying to activate anyway (ignoring errors).

Rob

Read only

0 Likes
2,395

it appears to be a problem of my own making. I think when I recreated the FM I copied the wrong source code (including the FM name) to the new one.

I've copied the correct source and things now activate.

To err is human, but to really mess up you need a computer.

Rob

Read only

Former Member
0 Likes
2,395

Include LZRB1U11 declare more than once in the Function Group, thats why this error occured.

LZRB1U11- Must be contains all function module names undet it and it declared twice or more in same function group. Redundant occurence need to remove from function group to resolve this error.

Thanks,

Abhineet.

Message was edited by: Abhineet Roy