<?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: PERFORM - USING - CHANGING statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-using-changing-statement/m-p/1834067#M355189</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i´m not sure what your problem is but i guess it´s the concept of&lt;/P&gt;&lt;P&gt;(using/changing).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using is the same like "importing" at a function and means that this is a parameter you pass to the Form.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Changing is ALMOST same like "tables" at a function and means that this is a parameter you pass to the Form, it´s data might be used in the Form and probabaly is beeing changed in the Form. Afterwards the Parameter is beeing passed back to the calling program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in other words: Using is a Call by value&lt;/P&gt;&lt;P&gt;and changing is a call by reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Jan 2007 14:41:20 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-01-24T14:41:20Z</dc:date>
    <item>
      <title>PERFORM - USING - CHANGING statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-using-changing-statement/m-p/1834064#M355186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am looking at a program that has the PERFORM USING CHANGING statement and I am trying to figure out why the person is doing this. It looks like the using changing options are for calling the same  process using different parameters. I have read the documentation when you press the F1 on the perform statement and I have read some of the responses in the forum but I am not grasping this. Is there more to why the person coded it this way?  I have a sample of the code attached and from what I can see, this perform is called only 1 time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF ty_zfi_im_prof_inv,&lt;/P&gt;&lt;P&gt;        bukrs       TYPE   zfi_im_prof_inv-bukrs,  "Company Code&lt;/P&gt;&lt;P&gt;        hkont       TYPE   zfi_im_prof_inv-hkont,  "Account No.&lt;/P&gt;&lt;P&gt;       END OF ty_zfi_im_prof_inv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA it_zfi_im_prof_inv TYPE STANDARD TABLE OF&lt;/P&gt;&lt;P&gt;                             ty_zfi_im_prof_inv INITIAL SIZE 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM select_data_zfi_im_prof_inv USING     p_bukrs&lt;/P&gt;&lt;P&gt;                                      CHANGING it_zfi_im_prof_inv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM select_data_zfi_im_prof_inv  USING value(p1_bukrs) TYPE t001-bukrs&lt;/P&gt;&lt;P&gt;               CHANGING p1_it_zfi_im_prof_inv TYPE ty_t_zfi_im_prof_inv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Select data from table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  SELECT bukrs  "Company Code&lt;/P&gt;&lt;P&gt;         hkont  "Account No.&lt;/P&gt;&lt;P&gt;    FROM zfi_im_prof_inv&lt;/P&gt;&lt;P&gt;    INTO TABLE p1_it_zfi_im_prof_inv&lt;/P&gt;&lt;P&gt;    WHERE bukrs = p1_bukrs. "Company Code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Issue error message if the select fails&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;    IF sy-batch IS INITIAL.&lt;/P&gt;&lt;P&gt;      MESSAGE i899 WITH text-015.&lt;/P&gt;&lt;P&gt;      LEAVE LIST-PROCESSING.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      MESSAGE e899 WITH text-015.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    SORT p1_it_zfi_im_prof_inv BY bukrs hkont.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM. " FORM SELECT_DATA_ZFI_IM_PROF_INV&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance for the help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jan 2007 14:30:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-using-changing-statement/m-p/1834064#M355186</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-24T14:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: PERFORM - USING - CHANGING statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-using-changing-statement/m-p/1834065#M355187</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;He is returning the data into p1_it_zfi_im_prof_inv using changing keyword in the subroutine. The work area is empty while entering the subroutine. after the perform is executed there would be data from zfi_im_prof_inv in this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if it helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jan 2007 14:35:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-using-changing-statement/m-p/1834065#M355187</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-24T14:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: PERFORM - USING - CHANGING statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-using-changing-statement/m-p/1834066#M355188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Timothy,&lt;/P&gt;&lt;P&gt; In General, the parameters that are passed in the USING section are passed by value, meaning, any changes to that formal parameter in side the form will not effect the sent value(Globally).&lt;/P&gt;&lt;P&gt;But the value that has been passed in the changing section of the perform statement will change the original value .&lt;/P&gt;&lt;P&gt;Using perform statement has an additional advantage of modularizing the code, other than reusability.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;YOu can refer the abapdocu transaction for sample programs in:&lt;/P&gt;&lt;P&gt;Modularization Techniques-&amp;gt;Procedures-&amp;gt;Examples on subroutines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jan 2007 14:38:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-using-changing-statement/m-p/1834066#M355188</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-24T14:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: PERFORM - USING - CHANGING statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-using-changing-statement/m-p/1834067#M355189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i´m not sure what your problem is but i guess it´s the concept of&lt;/P&gt;&lt;P&gt;(using/changing).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using is the same like "importing" at a function and means that this is a parameter you pass to the Form.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Changing is ALMOST same like "tables" at a function and means that this is a parameter you pass to the Form, it´s data might be used in the Form and probabaly is beeing changed in the Form. Afterwards the Parameter is beeing passed back to the calling program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in other words: Using is a Call by value&lt;/P&gt;&lt;P&gt;and changing is a call by reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jan 2007 14:41:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-using-changing-statement/m-p/1834067#M355189</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-24T14:41:20Z</dc:date>
    </item>
  </channel>
</rss>

