<?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: Func mod Vs Select single * in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/func-mod-vs-select-single/m-p/3854782#M926632</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you're programming a user exit of any kind, then you can get a performance improvement by using the function modules.  This is because they buffer the data for you, and the data you want may have been read somewhere already in the standard SAP code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 May 2008 11:27:27 GMT</pubDate>
    <dc:creator>matt</dc:creator>
    <dc:date>2008-05-23T11:27:27Z</dc:date>
    <item>
      <title>Func mod Vs Select single *</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/func-mod-vs-select-single/m-p/3854776#M926626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys&lt;/P&gt;&lt;P&gt;I have a question regarding the use of std function modules rather than customized selection.&lt;/P&gt;&lt;P&gt;E.g. instead of doing a &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select single * from marc 
where matnr = marc-matnr&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;is better if we use the Func Module marc_read ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Isnt this FM also going to eventually read the database by using a star or something?&lt;/P&gt;&lt;P&gt;Please enlighten me on the concept &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Sameer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2008 19:22:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/func-mod-vs-select-single/m-p/3854776#M926626</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-21T19:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: Func mod Vs Select single *</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/func-mod-vs-select-single/m-p/3854777#M926627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What you are saying is kind of true, however, sometimes these FM have a little bit overhead with all kinds of checks for example. On the other hand, normally these FM read all the fields of a db table, while most of the times you will only need a few of them. So performance wise it would be better to use your own selection in my opinion.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2008 19:33:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/func-mod-vs-select-single/m-p/3854777#M926627</guid>
      <dc:creator>Sm1tje</dc:creator>
      <dc:date>2008-05-21T19:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: Func mod Vs Select single *</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/func-mod-vs-select-single/m-p/3854778#M926628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sameer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My general approach to this problem is to use always the &lt;STRONG&gt;highest possible abstraction&lt;/STRONG&gt; and only use the SELECT statement as a last resort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.) Check if a class provides appropriate methods&lt;/P&gt;&lt;P&gt;2.) Check for a BAPI&lt;/P&gt;&lt;P&gt;3.) Check for function module &lt;/P&gt;&lt;P&gt;4.) ELSE: use SELECT statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In case of multiple available function modules I check the package assignment and prefer those ones which are "closest" to the SAP "core" modules.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2008 20:15:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/func-mod-vs-select-single/m-p/3854778#M926628</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2008-05-21T20:15:27Z</dc:date>
    </item>
    <item>
      <title>Re: Func mod Vs Select single *</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/func-mod-vs-select-single/m-p/3854779#M926629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SAP recommend to use FM instead of writing code for the same, so what ever is the code inside the FM it will be performance wise more effecient then your own code (as SAP say) so you should use FM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Bikas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2008 06:17:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/func-mod-vs-select-single/m-p/3854779#M926629</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-22T06:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: Func mod Vs Select single *</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/func-mod-vs-select-single/m-p/3854780#M926630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to add an example from recent experience:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Standard function READ_TEXT is designed for selecting long texts from STXH/STXL. But it reads one at a time. This does not matter much if you're dealing with hundreds or maybe a few thousands of objects. A very time critical interface I designed had to read about 300K of such long texts (on G/L document item level), so I had to come up with my own sort of mass processing. As a result, the text reading part of the interface ran about three to four times faster than before.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So Uwe's approach is perfect, as long as there is an existing method/function etc. that does the job and no performance issues arise (what Micky said, basically).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2008 10:54:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/func-mod-vs-select-single/m-p/3854780#M926630</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2008-05-22T10:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: Func mod Vs Select single *</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/func-mod-vs-select-single/m-p/3854781#M926631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; SAP recommend to use FM instead of writing code for the same, so what ever is the code inside the FM it will be performance wise more effecient then your own code (as SAP say) so you should use FM&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Regards&lt;/P&gt;&lt;P&gt;&amp;gt; Bikas&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Well, SAP would say that wouldn't they.  But SAP function modules are just bits of code whose efficiency depends on the skill of whoever has written them.  And I've seen examples of SAP standard code that I don't consider have been very well written.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One really good reason for using a SAP function module to get eg address data is that if SAP reorganise the way the data is stored - as I've read they did once to addresses - the function module should also have been rewritten so that it still works while your own selects would need to be rewritten.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2008 09:42:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/func-mod-vs-select-single/m-p/3854781#M926631</guid>
      <dc:creator>christine_evans</dc:creator>
      <dc:date>2008-05-23T09:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: Func mod Vs Select single *</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/func-mod-vs-select-single/m-p/3854782#M926632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you're programming a user exit of any kind, then you can get a performance improvement by using the function modules.  This is because they buffer the data for you, and the data you want may have been read somewhere already in the standard SAP code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2008 11:27:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/func-mod-vs-select-single/m-p/3854782#M926632</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2008-05-23T11:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: Func mod Vs Select single *</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/func-mod-vs-select-single/m-p/3854783#M926633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; Its better to use FM instead of using own Select statements. In most of the FMs, they use buffering technique which reduces the database access and in return helps in system performance. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thnx&lt;/P&gt;&lt;P&gt;Pradipta K Mishra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2008 13:54:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/func-mod-vs-select-single/m-p/3854783#M926633</guid>
      <dc:creator>pradiptakumar_mishra</dc:creator>
      <dc:date>2008-05-23T13:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: Func mod Vs Select single *</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/func-mod-vs-select-single/m-p/3854784#M926634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wow, This seems to ve started a debate &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanx  a lot guys for your inputs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sameer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2008 22:29:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/func-mod-vs-select-single/m-p/3854784#M926634</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-23T22:29:06Z</dc:date>
    </item>
    <item>
      <title>Re: Func mod Vs Select single *</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/func-mod-vs-select-single/m-p/3854785#M926635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To get the better of both you need to check the code written in fn module also . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It depends on the type and amount of the data which is to be fetched will give u. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also select single directly reads from the DB .So u shld now know which to use for better performance .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2008 09:44:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/func-mod-vs-select-single/m-p/3854785#M926635</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-28T09:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: Func mod Vs Select single *</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/func-mod-vs-select-single/m-p/3854786#M926636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sameer!&lt;/P&gt;&lt;P&gt;Using already existing code i.e FM is always bettr if u have to fetch all the records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems u r enjoying the debate &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I guess it would be good if u mark the question as "answered."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope the above answers helped u!&lt;/P&gt;&lt;P&gt;dnt forget to rewrd.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2008 07:12:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/func-mod-vs-select-single/m-p/3854786#M926636</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-30T07:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: Func mod Vs Select single *</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/func-mod-vs-select-single/m-p/3854787#M926637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks people &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2008 13:41:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/func-mod-vs-select-single/m-p/3854787#M926637</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-30T13:41:11Z</dc:date>
    </item>
  </channel>
</rss>

