2013 Jul 05 10:54 AM
Hi Guys,
in my function module there is a subroutine that is implemented in two different includes but with different number of parameters. How can i make my function module to choose the right one. It is jumping to the wrong one. The 2 includes are of course in the same function group.
Thanks
2013 Jul 05 11:48 AM
You can rename the subroutines to avoid confusion.
Having 2 subroutines of same name but different parameters is not allowed, and I wonder why your program passed the syntax check.
2013 Jul 05 12:43 PM
Hi,
I have just copied a working programm and would like to make some changes. The two subroutines are in differents include. Everything worked fine in the old programm. I just need to activate this one and add more code to it.
HELP!!!!
2013 Jul 05 12:17 PM
when you call perform, give include name as well.
PERFORM subroutine_name(include_name).
Regards
2013 Jul 05 12:31 PM
Maria,
It is better to give different performs names to avoid confusion. Later it might be difficult to identify issues.
Thanks.
2013 Jul 05 2:23 PM
Hi,
You should not be able to compile such a FM because of the duplicate name. The only option should be to use the PERFORM subroutine_name(include_name) but I personally don't like it.
Regards,
David.
2013 Jul 08 12:15 PM
Hi Maria,
I think it is not possible to have the same FORM name two times in the same program or function group. This should cause a syntax error, when all includes are active.
You have to rename the FORM names then.
Regards,
Klaus
2013 Jul 08 12:22 PM
I wonder how the Function module activation passes the syntax text.
1. Open it in SE80 and activate the whole module. And check if the activation is successful or not.
2. Secondly, it is good to have a different subroutine name instead of single name. ( I do not see an polymorphism in ABAP )
Regards,
Venkat
2013 Jul 08 5:23 PM
Hi all,
the code has been working like that for years and I prefer not to change anything. What I did, was to copy what I needed locally for my own implementation. I will then transfer to the new function modules only not the includes(they are already in used) when my test is done. So what I need to know now for my local test is if
PERFORM subroutine_name(include_name) is the best alternative now. I dont want to change a working code that is used by many differents programs.