<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Program which creates function module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-which-creates-function-module/m-p/6136542#M1366254</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nothing comes automatically or predefined.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to code your requirement in a FM/program(include) and you may use that in your program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may also create a generic business object or check out OO polymorphism(create a generic class with predefined methods and parameters) which might help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the best.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 13 Sep 2009 12:12:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-09-13T12:12:57Z</dc:date>
    <item>
      <title>Program which creates function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-which-creates-function-module/m-p/6136541#M1366253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wonder if there is a way to write an ABAP program, that will read predefined source code (e.g from file) and then creates a new function module, which will contain the source code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help,&lt;/P&gt;&lt;P&gt;Sivan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Sep 2009 10:34:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-which-creates-function-module/m-p/6136541#M1366253</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-13T10:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: Program which creates function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-which-creates-function-module/m-p/6136542#M1366254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nothing comes automatically or predefined.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to code your requirement in a FM/program(include) and you may use that in your program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may also create a generic business object or check out OO polymorphism(create a generic class with predefined methods and parameters) which might help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the best.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Sep 2009 12:12:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-which-creates-function-module/m-p/6136542#M1366254</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-13T12:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: Program which creates function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-which-creates-function-module/m-p/6136543#M1366255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the answer.&lt;/P&gt;&lt;P&gt;Maybe I'll explain my requirement in more details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to write a report, which gets parameters and from these parameters create a FM. &lt;/P&gt;&lt;P&gt;(the function module will be created after the report ends the execution).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there an API to create FM?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A parameter can be FM name and FM code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sivan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Sivan Zommer on Sep 13, 2009 4:14 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Sep 2009 14:01:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-which-creates-function-module/m-p/6136543#M1366255</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-13T14:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: Program which creates function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-which-creates-function-module/m-p/6136544#M1366256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sivan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One alternative I can see for this requirement is to record function module creation using BDC and then convert that &lt;/P&gt;&lt;P&gt;record in function module. You can replace the function module name, code, function group name from user input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Augustin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Sep 2009 15:44:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-which-creates-function-module/m-p/6136544#M1366256</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-13T15:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: Program which creates function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-which-creates-function-module/m-p/6136545#M1366257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think this is a good idea...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can the user also influence the file path?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since ancient times SAP has a function module called RFC_ABAP_INSTALL_AND_RUN. If you take a look through the coding and consider that it is in it's own function group then you might also think to yourself what good this could possibly bring - except in a sandbox system in an isolated network... &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have seen some solutions which create FM's "on the fly" but their source is always the problem. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you explain your requirement? Perhaps it is "only" a release dependency which you are trying to achieve? I am sure there is a better way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Julius&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Sep 2009 20:45:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-which-creates-function-module/m-p/6136545#M1366257</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-13T20:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: Program which creates function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-which-creates-function-module/m-p/6136546#M1366258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The thing is that I want to run a 'main' report, that will get data from external system and then use this data to create a FM.&lt;/P&gt;&lt;P&gt;This external data will be used in the source code for the FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Afterwards I want to create a web service from the function module.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2009 06:56:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-which-creates-function-module/m-p/6136546#M1366258</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-14T06:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: Program which creates function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-which-creates-function-module/m-p/6136547#M1366259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; The thing is that I want to run a 'main' report, that will get data from external system and then use this data to create a FM.&lt;/P&gt;&lt;P&gt;&amp;gt; This external data will be used in the source code for the FM.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Afterwards I want to create a web service from the function module.&lt;/P&gt;&lt;P&gt;Sounds very much as if transporting (see transaction STMS) is what you are looking for...?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or alternately something like SAINT with which you can upload packages?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or does the "external system" also need to be your own PC? Is your PC in the same network as the database server? Is the data txt file format?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Julius&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2009 11:48:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-which-creates-function-module/m-p/6136547#M1366259</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-14T11:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: Program which creates function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-which-creates-function-module/m-p/6136548#M1366260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'll try to explain this in example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a text file, which includes 3 field names and types.&lt;/P&gt;&lt;P&gt;The report reads the file and the 3 fields.&lt;/P&gt;&lt;P&gt;Now, I want to create a function module that will get those field as parameters and use them in the source code of the FM.&lt;/P&gt;&lt;P&gt;(the function module can be created in the same system as the report exists in).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sivan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2009 11:56:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-which-creates-function-module/m-p/6136548#M1366260</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-14T11:56:56Z</dc:date>
    </item>
    <item>
      <title>Re: Program which creates function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-which-creates-function-module/m-p/6136549#M1366261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sivan,&lt;/P&gt;&lt;P&gt;if the logic which your are going to write is same&lt;/P&gt;&lt;P&gt;i guess u can try using BDC &lt;/P&gt;&lt;P&gt;as said by some one in the same thread&lt;/P&gt;&lt;P&gt;record SE37&lt;/P&gt;&lt;P&gt;and try to start with your coding&lt;/P&gt;&lt;P&gt;with regards&lt;/P&gt;&lt;P&gt;s.janagar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2009 11:58:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-which-creates-function-module/m-p/6136549#M1366261</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-14T11:58:03Z</dc:date>
    </item>
    <item>
      <title>Re: Program which creates function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-which-creates-function-module/m-p/6136550#M1366262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sivan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please have a look at the packet SFUNC. This Packet holds everything you need to create functions modules programmatically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if you have always the same source code and it differs only in the parameters it could be better to write a function module which has a "key/value" Table as parameter. I guess you want so write some generic Import Interface which can be called from outside. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you give us more information about the thing you want to do, we can help you. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bastian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2009 12:27:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-which-creates-function-module/m-p/6136550#M1366262</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-14T12:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: Program which creates function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-which-creates-function-module/m-p/6136551#M1366263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, I am a bit slow today &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you want a whole bunch of identical FMs except for a part of each which you want to load from the text file instead of typing it into the editor?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think it would be much easier to simply put all the text file data into the FM itself in form subroutines and call it with a parameter which determines the form to be performed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can still create as many services as you wish for the FM and set the parameter in the service call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I on the right track now?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Julius&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2009 12:27:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-which-creates-function-module/m-p/6136551#M1366263</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-14T12:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: Program which creates function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-which-creates-function-module/m-p/6136552#M1366264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks. I think that is what I need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you can help me with one more simple thing: &lt;/P&gt;&lt;P&gt;What is the procedure to create the FM automatically, means that the function name, package and parameters will be set in the code (and not as user input).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sivan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2009 12:58:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-which-creates-function-module/m-p/6136552#M1366264</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-14T12:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: Program which creates function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-which-creates-function-module/m-p/6136553#M1366265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My understanding of Basitian's post and my simultaneous one is that you don't need to create the FM name, package, parameters "on the fly".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The "variable" parts are inside the function module which you can create normally and then call with a parametere value which instructs it which code to run.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Julius&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2009 13:17:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-which-creates-function-module/m-p/6136553#M1366265</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-14T13:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: Program which creates function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-which-creates-function-module/m-p/6136554#M1366266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sivan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as Julius and I mentioned before, we don't think that you have to create a dozends of FM. So it would be easier for you, if you create one generic FM with flexible Interface (Parameters).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Think about maintaining a bunch of FM if something changes in Source. You have to change every module instead of just one FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bastian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2009 13:39:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-which-creates-function-module/m-p/6136554#M1366266</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-14T13:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: Program which creates function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-which-creates-function-module/m-p/6136555#M1366267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First of all, thanks for the good advice &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The thing behind my thought now is to generate several web services and each one of them is based on function module. &lt;/P&gt;&lt;P&gt;Each web service will get different parameters... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a look at SFUNC and managed to create a function module. My question now is how to insert the input, output and source code into it (automatically of course - in the function call from SFUNC). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sivan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2009 14:05:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-which-creates-function-module/m-p/6136555#M1366267</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-14T14:05:27Z</dc:date>
    </item>
  </channel>
</rss>

