<?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: return value in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-value/m-p/3863157#M928531</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;importing u type i,  is pass by reference&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;importing value( u) type i.is pass by value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In pass by reference, the change in formal parameter will  affect the actual parameter. where as in case of pass by value, it wont.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 May 2008 10:19:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-19T10:19:55Z</dc:date>
    <item>
      <title>return value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-value/m-p/3863154#M928528</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;&lt;/P&gt;&lt;P&gt;can any body  gives the  diffrence b/w&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;importing   u  type i,&lt;/P&gt;&lt;P&gt;importing  value( u) type i.&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;&lt;/P&gt;&lt;P&gt;Spanadana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 May 2008 09:09:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-value/m-p/3863154#M928528</guid>
      <dc:creator>spandana_babu</dc:creator>
      <dc:date>2008-05-16T09:09:17Z</dc:date>
    </item>
    <item>
      <title>Re: return value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-value/m-p/3863155#M928529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;by reference or by value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;especially for internal tables, this can result in loss of performance. So use the reference and not the 'pass by value'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Micky Oestreich on May 16, 2008 11:11 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 May 2008 09:11:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-value/m-p/3863155#M928529</guid>
      <dc:creator>Sm1tje</dc:creator>
      <dc:date>2008-05-16T09:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: return value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-value/m-p/3863156#M928530</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;please  see once&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class sl definition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                   public section.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                    data : v_a type i,&lt;/P&gt;&lt;P&gt;                           v_b type i.&lt;/P&gt;&lt;P&gt;                      methods : add importing  p_a type i&lt;/P&gt;&lt;P&gt;                                               p_b type i&lt;/P&gt;&lt;P&gt;                                      returning  value(p_c) type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                    protected section.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                    private section.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; endclass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; class sl implementation.&lt;/P&gt;&lt;P&gt;                    method add.&lt;/P&gt;&lt;P&gt;                    p_c = p_a  + p_b.&lt;/P&gt;&lt;P&gt;                    &lt;/P&gt;&lt;P&gt;                      endmethod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; endclass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;              data:  obj type ref to nsl,&lt;/P&gt;&lt;P&gt;                     b1 type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;              create object obj.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;           call method obj-&amp;gt;add( exporting p_a = 10   p_b = 20 ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; up to now  coding is  fine  if  i replace  last statement  with&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;belovw code&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;           b1 = obj-&amp;gt;add( exporting p_a = 10   p_b = 20 ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it show  error that  p_a unable to interrput.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plesse provide the solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; if  i  am taking  single parameters it is working ok&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where as  i  am taking  2 parametrs  it is not  working..&lt;/P&gt;&lt;P&gt; please give solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;spandana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 May 2008 10:22:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-value/m-p/3863156#M928530</guid>
      <dc:creator>spandana_babu</dc:creator>
      <dc:date>2008-05-16T10:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: return value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-value/m-p/3863157#M928531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;importing u type i,  is pass by reference&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;importing value( u) type i.is pass by value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In pass by reference, the change in formal parameter will  affect the actual parameter. where as in case of pass by value, it wont.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2008 10:19:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-value/m-p/3863157#M928531</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-19T10:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: return value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-value/m-p/3863158#M928532</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 can pass parameters in 3 ways&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pass by value&lt;/P&gt;&lt;P&gt;Pass by reference &lt;/P&gt;&lt;P&gt;Pass by values and result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The example which you gave comes under the category of pass by value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In general if you use &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"importing u type i,&lt;/STRONG&gt; it means you are passing the variable with reference to actual parameter. so if you change the value i, it directly affects the actual parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you use &lt;STRONG&gt;"importing value( u) type i"&lt;/STRONG&gt; then it is pass by value i.e you are just using a formal parameter and it does not affect the actual parameter . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example: &lt;/P&gt;&lt;P&gt;data: f1 value 'A'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  perform s1 using f1.&lt;/P&gt;&lt;P&gt;  write / f1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  form s1 using value(p1).&lt;/P&gt;&lt;P&gt;      p1 = 'X'.&lt;/P&gt;&lt;P&gt;      write / p1.&lt;/P&gt;&lt;P&gt;     endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;output will be&lt;/P&gt;&lt;P&gt; X&lt;/P&gt;&lt;P&gt;A&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2008 13:18:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-value/m-p/3863158#M928532</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-19T13:18:25Z</dc:date>
    </item>
  </channel>
</rss>

