<?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: sub routines in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sub-routines/m-p/2237598#M482041</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;data: a type i value 10, 
      b type i value 10.
 
 
perform sum using a changing b.
write: a,b.
 
 
form sum using a changing b.
a = a + 1.
b = b + 1.
endform.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This link will clear all your Doubts reagrding Perform Statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look:&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2005/helpdata/en/9f/db977635c111d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2005/helpdata/en/9f/db977635c111d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Santosh Kumar Patha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 May 2007 06:03:37 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-07T06:03:37Z</dc:date>
    <item>
      <title>sub routines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sub-routines/m-p/2237597#M482040</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;can any one give me sample code for understanding the parametres of a subroutines...especially&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; &amp;lt;b&amp;gt;"using"&amp;lt;/b&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; an &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;lt;b&amp;gt;"changing"&amp;lt;/b&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;  parameters in both call by reference and call value method ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank u&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ginni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2007 06:00:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sub-routines/m-p/2237597#M482040</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-07T06:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: sub routines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sub-routines/m-p/2237598#M482041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;data: a type i value 10, 
      b type i value 10.
 
 
perform sum using a changing b.
write: a,b.
 
 
form sum using a changing b.
a = a + 1.
b = b + 1.
endform.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This link will clear all your Doubts reagrding Perform Statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look:&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2005/helpdata/en/9f/db977635c111d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2005/helpdata/en/9f/db977635c111d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Santosh Kumar Patha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2007 06:03:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sub-routines/m-p/2237598#M482041</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-07T06:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: sub routines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sub-routines/m-p/2237599#M482042</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;PRE&gt;&lt;CODE&gt;PROGRAM FORM_TEST.

DATA: NUM1 TYPE I,
NUM2 TYPE I,
SUM TYPE I.

NUM1 = 2. NUM2 = 4.
PERFORM ADDIT USING NUM1 NUM2 CHANGING SUM.

NUM1 = 7. NUM2 = 11.
PERFORM ADDIT USING NUM1 NUM2 CHANGING SUM.

FORM ADDIT 
       USING ADD_NUM1 
             ADD_NUM2 
       CHANGING ADD_SUM.

  ADD_SUM = ADD_NUM1 + ADD_NUM2.
  PERFORM OUT USING ADD_NUM1 ADD_NUM2 ADD_SUM.

ENDFORM.

FORM OUT 
       USING OUT_NUM1 
             OUT_NUM2 
             OUT_SUM.

  WRITE: / 'Sum of', OUT_NUM1, 'and', OUT_NUM2, 'is', OUT_SUM.

ENDFORM.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The produces the following output:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum of 2 and 4 is 6&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum of 7 and 11 is 18&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this example, the actual parameters NUM1, NUM2, and SUM are passed by reference to the formal parameters of the subroutine ADDIT. After changing ADD_SUM, the latter parameters are then passed to the formal parameters OUT_NUM1, OUT_NUM2, and OUT_SUM of the subroutine OUT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Input parameters which are changed in the subroutine are also changed in the calling program. To prevent this, you must pass the parameter by value in a USING addition.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2007 06:08:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sub-routines/m-p/2237599#M482042</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-07T06:08:45Z</dc:date>
    </item>
  </channel>
</rss>

