<?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 Subroutines Using and Changing Parameters-No syntax error in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/subroutines-using-and-changing-parameters-no-syntax-error/m-p/591732#M23888</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;REPORT  ztest.
DATA:lv_bukrs TYPE bukrs,
     lv_werks TYPE werks,
     lv_spart TYPE spart,
     lv_vtweg TYPE vtweg.


PERFORM test1 USING lv_bukrs
                    lv_werks
           CHANGING lv_spart
                    lv_vtweg.
PERFORM test2 USING lv_bukrs
                    lv_werks
           CHANGING lv_spart
                    lv_vtweg.
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  test1
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      --&amp;gt;LV_BUKRS   text
*      --&amp;gt;LV_WERKS   text
*      --&amp;gt;LV_SPART   text
*      --&amp;gt;LV_WTEG    text
*----------------------------------------------------------------------*
FORM test1 USING lv_bukrs
                lv_werks
       CHANGING lv_spart
                lv_vtwteg.
ENDFORM.                                                    "test1
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  test2
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      --&amp;gt;LV_BUKRS   text
*      --&amp;gt;LV_WERKS   text
*      --&amp;gt;LV_SPART   text
*      --&amp;gt;LV_WTEG    text
*----------------------------------------------------------------------*
FORM test2 USING lv_bukrs
       CHANGING lv_werks
                lv_spart
                lv_vtwteg.
ENDFORM.                                                    "test2
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;For the 2nd subroutine FORM-ENDFORM, even though the USING and CHANGING parameters are not in synch,it is not throwing any error but showing syntactically correct and getting activated,where infact this should be an error. &lt;/P&gt;
  &lt;P&gt;Any thoughts on why is it so. &lt;/P&gt;
  &lt;P&gt;SAP ECC 6.0/SAP_ABA/701/0008/SAPKA70108.&lt;/P&gt;
  &lt;P&gt;Thanks,&lt;/P&gt;
  &lt;P&gt;K.Kiran.&lt;/P&gt;</description>
    <pubDate>Fri, 23 Feb 2018 06:28:43 GMT</pubDate>
    <dc:creator>kiran_k8</dc:creator>
    <dc:date>2018-02-23T06:28:43Z</dc:date>
    <item>
      <title>Subroutines Using and Changing Parameters-No syntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/subroutines-using-and-changing-parameters-no-syntax-error/m-p/591732#M23888</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;REPORT  ztest.
DATA:lv_bukrs TYPE bukrs,
     lv_werks TYPE werks,
     lv_spart TYPE spart,
     lv_vtweg TYPE vtweg.


PERFORM test1 USING lv_bukrs
                    lv_werks
           CHANGING lv_spart
                    lv_vtweg.
PERFORM test2 USING lv_bukrs
                    lv_werks
           CHANGING lv_spart
                    lv_vtweg.
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  test1
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      --&amp;gt;LV_BUKRS   text
*      --&amp;gt;LV_WERKS   text
*      --&amp;gt;LV_SPART   text
*      --&amp;gt;LV_WTEG    text
*----------------------------------------------------------------------*
FORM test1 USING lv_bukrs
                lv_werks
       CHANGING lv_spart
                lv_vtwteg.
ENDFORM.                                                    "test1
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  test2
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      --&amp;gt;LV_BUKRS   text
*      --&amp;gt;LV_WERKS   text
*      --&amp;gt;LV_SPART   text
*      --&amp;gt;LV_WTEG    text
*----------------------------------------------------------------------*
FORM test2 USING lv_bukrs
       CHANGING lv_werks
                lv_spart
                lv_vtwteg.
ENDFORM.                                                    "test2
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;For the 2nd subroutine FORM-ENDFORM, even though the USING and CHANGING parameters are not in synch,it is not throwing any error but showing syntactically correct and getting activated,where infact this should be an error. &lt;/P&gt;
  &lt;P&gt;Any thoughts on why is it so. &lt;/P&gt;
  &lt;P&gt;SAP ECC 6.0/SAP_ABA/701/0008/SAPKA70108.&lt;/P&gt;
  &lt;P&gt;Thanks,&lt;/P&gt;
  &lt;P&gt;K.Kiran.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 06:28:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subroutines-using-and-changing-parameters-no-syntax-error/m-p/591732#M23888</guid>
      <dc:creator>kiran_k8</dc:creator>
      <dc:date>2018-02-23T06:28:43Z</dc:date>
    </item>
    <item>
      <title>Re: Subroutines Using and Changing Parameters-No syntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/subroutines-using-and-changing-parameters-no-syntax-error/m-p/591733#M23889</link>
      <description>&lt;P&gt;It has &lt;STRONG&gt;always &lt;/STRONG&gt;been like that. Only warnings in the syntax check if you change statically the values of USING parameters. SAP can't change the behavior because there's a lot of existing code which does that (even standard). &lt;/P&gt;
  &lt;P&gt;&lt;A href="https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapform.htm" target="test_blank"&gt;https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapform.htm&lt;/A&gt; :&lt;/P&gt;
  &lt;UL&gt;
   &lt;LI&gt;Formal parameters defined for pass by reference with USING should not be changed in the subroutine. In this case, CHANGING can be used instead. Changes produce syntax check warnings. &lt;/LI&gt;
  &lt;/UL&gt;
  &lt;P&gt;Anyway, subroutines are obsolete.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 07:02:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subroutines-using-and-changing-parameters-no-syntax-error/m-p/591733#M23889</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2018-02-23T07:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: Subroutines Using and Changing Parameters-No syntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/subroutines-using-and-changing-parameters-no-syntax-error/m-p/591734#M23890</link>
      <description>&lt;P&gt;Don't use FORMs - they're obsolete language elements. For exactly reasons like the behaviour you're seeing!&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 07:34:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subroutines-using-and-changing-parameters-no-syntax-error/m-p/591734#M23890</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2018-02-23T07:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: Subroutines Using and Changing Parameters-No syntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/subroutines-using-and-changing-parameters-no-syntax-error/m-p/591735#M23891</link>
      <description>&lt;P&gt;&lt;A href="https://help.sap.com/http.svc/rc/abapdocu_752_index_htm/7.52/en-US/index.htm?file=abapform.htm" target="test_blank"&gt;https://help.sap.com/http.svc/rc/abapdocu_752_index_htm/7.52/en-US/index.htm?file=abapform.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 10:43:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subroutines-using-and-changing-parameters-no-syntax-error/m-p/591735#M23891</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2018-02-23T10:43:33Z</dc:date>
    </item>
  </channel>
</rss>

