2014 Apr 28 10:25 AM
Hi All,
I wated to know is it possible to create a function module from an abap program. The requirement is that I wanted to create a function module from third party software. Hence, I cant use the usual way of the SE37 dialog steps.
So, please let me know if any of you have got ideas on this...
Thanks & regards,
Guru
2014 Apr 28 12:35 PM
Hi Guru,
it is also possible to achieve that through an SHDB record from SE37 with all your required steps.
Then you can use that Z record inside your ABAP program with the BDCDATA internal table adjusting the parameters for your specific needs, and finally make a call transaction for SE37.
That is the easiest and reliable way of creating FMs from ABAP programs.
Regards.
2014 Apr 28 10:33 AM
As far as I know, there is nothing automatic.
The simplest answer is that all your selection screen becomes the function modules interface and the resulting list is returned in a table.
But some analysis may be necessary, study of technical constraints, who will use this function, is it RFC, etc...
2014 Apr 28 11:10 AM
1.) Create FM with selection screen inputs as interface.
2.) Use Submit program inside your FM to call your report directly.
But this is basic question, there is no technical input require in this question only manual effort is require.
BR,
Prakash
2014 Apr 28 11:07 AM
Hi Guru,
You can have a look at the code share SAPLinks.
They use XML based interface to create almost all SAP Objects including Function groups.
You can use the same to achieve.. it is a long shot but you can give a try.
Regards
2014 Apr 28 12:35 PM
Hi Guru,
it is also possible to achieve that through an SHDB record from SE37 with all your required steps.
Then you can use that Z record inside your ABAP program with the BDCDATA internal table adjusting the parameters for your specific needs, and finally make a call transaction for SE37.
That is the easiest and reliable way of creating FMs from ABAP programs.
Regards.
2014 Apr 28 1:43 PM
Hi All,
Thanks for the answers....I resolved the issue myself. We can use the API "RS_FUNCTIONMODULE_INSERT" to create a FM from third party software. It works fine. You can specify, the Function group, Source code line, importables etc. I am really happy to see such FM existing in SAP...
Also, there are plenty of other FMs like FM to create function group or to activate FM or rename a FM etc... Please check...
Thanks
~ Guru