10-21-2015 8:08 AM
Hi All,
I have one requirement to dynamically create Remote enable function module.
I got one FM : FUNCTION_CREATE.
It create Function module but there is no provision to write coding for FM.
Kindly suggest...
Thanks in Advance.
Regards
Vivek
10-26-2015 12:59 PM
10-21-2015 8:22 AM
Have you had a look at the rest of the function modules in the same function group ?
Would 'GENERATE SUBROUTINE-POOL' be able to do the same job ?
Rich
10-26-2015 5:12 AM
Hi Richard,
I need to create function module,only because this is the only object which can be called remotely using RFC connection.
Kindly suggest..
Regards
Vivek
10-26-2015 8:38 AM
Why does it need to be dynamic ? Could you not write a function module stub that then generates it's own subroutine pool ?
Explain exactly why it has to be dynamic. There then may be another way around your problem.
Rich
10-26-2015 9:20 AM
Dynamic function module called from another system, do security admins agree with it?
Did you also manage remote call authorization (Object S_RFC) ?
Question: Creating a dynamic RFC FM is a solution, what is the initial requirement ?
Regards,
Raymond
10-26-2015 9:07 AM
10-26-2015 9:55 AM
Hi Swet,
It's not dynamically calling a funtion module - it's writing one.
Rich
10-26-2015 10:31 AM
Swet posted a link farm. It's been rejected. But it's a good demonstration why link farms are often useless - they don't relate to the question asked!
10-26-2015 10:36 AM
Rather it's not that the link farm is useless, it's that the question has not been understood..... I tend to find that a lot in the forums. People answer questions and it's obviouis that they either have not taken the time to fully understand what the OP has actually asked or they don't have the capability to understand what the OP asked.
10-26-2015 12:16 PM
Link farms are heavily discourage here nonetheless. If they're useful, then it's a strong indication of the OP not searching!
10-26-2015 12:59 PM
10-28-2015 8:31 AM
Hi All,
I already gone through the above posting, But actually I am creating tool to create Remote enabled Function module which will use to call existing Class.
All import and export parameter of class will become Parameter of FM.
I hope , everyone understand my requirement.
Regards
Vivek
10-28-2015 12:08 PM
How many such classes would you have? How much would be the manual effort to create RFCs for those? If at all you find a way to create function modules programmatically, does the effort required to implement it, justify the method?
Thanks,
Juwin
10-28-2015 12:25 PM
Hi Juwin,
Thanks for quick reply.
I can understand that creating FM dynamically can hamper FM but As i told you that i need to create a tool for some specific requirement.
It is not about manual effort, its about the functionality.
Regards
Vivek
10-28-2015 2:51 PM
Ok though this is not recommended but you can try using INSERT REPORT to generate the code.
Something like INSERT REPORT prog FROM itab where prog is the FM include ( Normally "L" + Function Group name + "U" + 01/02... so on or do a search on table TFDIR to get the Count also ).
Output:
Check the F1 help for INSERT REPORT.
Please note insert report generates the code exactly the way you populate the internal table . So punctuation is important. Otherwise the FM will show as "Active" in SE37/SE80 but will not run because of syntax error.
R
10-30-2015 3:50 PM
Stupid question.....
Where do you put the code that enables you to run a program that uses 'INSERT REPORT' If the whole idea is to have a generic function call in the first place ?
Secondly, this is not a temporary solution is it ? Unlike GENERATE SUBPOOL, this is actually written to the database.
Lastly, what would your security bods think of this ? It would probably give them hives......
10-30-2015 4:25 PM
How will Insert report, create a Function module? A Function module requires an entry in TFDIR also, right? Also, every time a Function created, it will require UXX include also to be updated. UXX documentation clearly says not to touch it. So, I guess you can use this method to Update a Function module, but not create one.
For this reason, I don't think this answer is the 'correct solution' for the issue.
Thanks
Juwin
10-30-2015 4:56 PM
1. OP has clearly said that he wants to build a tool . So I assume he must have used in in custom program.
2. Yes Its is not a temporary solution. May be it does not have to be temporary.
3. They never mind in my case . Because they know me.
Thanks and have a nice weekend.
10-30-2015 4:57 PM
You did not get the question . Did you?
He is able to build the FM ( By using FM FUNCTION_CREATE ) and then he wants to change the code inside the FM body.
Thanks and have a nice weekend.
10-30-2015 9:48 PM
10-28-2015 3:09 PM
What is it that you're trying to achieve by using dynamic function modules? Perhaps if you explained that, we could come up with a simpler solution.
10-29-2015 6:12 AM
Hi Matthew,
Actually ,I am creating a tool which will use the existing assistance class and create Remote enable FM which we can use for creating Service.
Thanks rudra, I am able to write code inside FM.
Regards
Vivek
10-29-2015 6:23 AM
I still have no idea what you are trying to achieve. Perhaps some context? What "assistance class". What service are you wanting to create.