<?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: Internal Tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/4273585#M1019629</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arnab,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when we use pass by reference to pass variable or internal table then we pass the address of the internal table or variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So whatever changes is made in side the subrouitne it is reflected in the internal table or variable in the main program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if we use pass by value then in the subroutine formal parameters are created as a copy of the actual parameter in the main program.Formal parameter has it own memory.So whatever changes you make inside the subrouitne has no effect in the internal table or variable of the main progarm ie. on the actual parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it depends on your requirement whether you want to get the changed value or you want that main program internal table should not change.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As per the requirement you choose Pass by value or Pass by reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you get it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sujit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 02 Aug 2008 06:41:50 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-02T06:41:50Z</dc:date>
    <item>
      <title>Internal Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/4273581#M1019625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why are internal tables always passed by reference and not by value?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Aug 2008 06:17:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/4273581#M1019625</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-02T06:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/4273582#M1019626</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;You can even pass a internal table by value also by using CHANGING  VALUE(tab) addition basically if we pass the internal by reference then the changes are visible to the MAIN program or the calling program if we pass the internal table by VALUE then any changes made to the table are not visible to the external program or main program from which you are calling the subroutine&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="979393"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Check the Example|http://help.sap.com/saphelp_nw70/helpdata/en/9f/db979035c111d1829f0000e829fbfe/content.htm]&lt;/P&gt;&lt;P&gt;&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;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Aug 2008 06:20:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/4273582#M1019626</guid>
      <dc:creator>bpawanchand</dc:creator>
      <dc:date>2008-08-02T06:20:16Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/4273583#M1019627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arnab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to suggest,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Pass by Reference&lt;/STRONG&gt; means passing the Address itself (Reference).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Pass by Value&lt;/STRONG&gt; means passing a copy of the value to be passed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Database Performance purposes, we pass Internal table by Reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to suggest a reference,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[SDN - Reference - Passing by value and Passing by reference - Internal Table|&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="741554"&gt;&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that's usefull.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good Luck &amp;amp; Regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Harsh Dave&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Aug 2008 06:26:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/4273583#M1019627</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-02T06:26:07Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/4273584#M1019628</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;We send Internal table always passed by reference because internal table is a complex data type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We can send internal table by value or by CHANGING. But then a copy of the TAble will created and the Actual table remains Data less.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sumit Agarwal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Aug 2008 06:28:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/4273584#M1019628</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-02T06:28:55Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/4273585#M1019629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arnab,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when we use pass by reference to pass variable or internal table then we pass the address of the internal table or variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So whatever changes is made in side the subrouitne it is reflected in the internal table or variable in the main program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if we use pass by value then in the subroutine formal parameters are created as a copy of the actual parameter in the main program.Formal parameter has it own memory.So whatever changes you make inside the subrouitne has no effect in the internal table or variable of the main progarm ie. on the actual parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it depends on your requirement whether you want to get the changed value or you want that main program internal table should not change.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As per the requirement you choose Pass by value or Pass by reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you get it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sujit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Aug 2008 06:41:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/4273585#M1019629</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-02T06:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/4273586#M1019630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; Pass by Reference means passing the Address itself (Reference).&lt;/P&gt;&lt;P&gt;&amp;gt; Pass by Value means passing a copy of the value to be passed.&lt;/P&gt;&lt;P&gt;&amp;gt; For Database Performance purposes, we pass Internal table by Reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are correct in your statement with regards to what the difference is between them but I would like to point out that it has nothing to do with "Database Performance purposes".  The performance concern would be not related to the database but instead with the application server performance and the usage of memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~Ian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Aug 2008 20:02:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/4273586#M1019630</guid>
      <dc:creator>ian_maxwell2</dc:creator>
      <dc:date>2008-08-02T20:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/4273587#M1019631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;Internal tables are always passed through reference and not by value as if we pass through values always a copy of the the variable is stored and as internal tables are very large in size so keeping a copy in the application server will affect the performance.&lt;/P&gt;&lt;P&gt;Regards ,&lt;/P&gt;&lt;P&gt;Debojyoti.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2008 05:50:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/4273587#M1019631</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-04T05:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/4273588#M1019632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;  We pass internal tables by reference because internal table contains lots of data.&lt;/P&gt;&lt;P&gt;When you pass an internal table by value a copy of internal table is made and then it is passed to your subrotuine. So it requires a lot of memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when you pass an internal table by reference just address of that internal table is passed. This means that no copy of internal table is made.&lt;/P&gt;&lt;P&gt;That why internal table is generally passed by reference&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Abhijeet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2008 06:00:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/4273588#M1019632</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-04T06:00:47Z</dc:date>
    </item>
  </channel>
</rss>

