<?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: Modify internal table in a subroutine in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-in-a-subroutine/m-p/515175#M18268</link>
    <description>&lt;P&gt;You didn't 'type' the parameter of the internal table, you didn't define any local variable, you didn't loop or read the internal table, you didn't explicitly provide the record to modify, no index, no key, in the internal tables, etc. &lt;/P&gt;</description>
    <pubDate>Wed, 29 Nov 2017 06:29:45 GMT</pubDate>
    <dc:creator>RaymondGiuseppi</dc:creator>
    <dc:date>2017-11-29T06:29:45Z</dc:date>
    <item>
      <title>Modify internal table in a subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-in-a-subroutine/m-p/515174#M18267</link>
      <description>&lt;P&gt;Hello guys, I can not modify an internal table in a subrutine, if I put my code out of subrutine it is possible but in a subroutine is not possible. Please see:&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;FORM f_zpr0 TABLES  I_IT_MATERIALES.
  SELECT SINGLE * FROM A306 INTO WA_A306
  WHERE KAPPL = 'V'
 AND   KSCHL = V_CONDICION   "****** Se realiza busqueda por precio normal  ZPR0 ************
 AND   MATNR = WA_MATERIALES-MATNR
 AND   VKORG = WA_MATERIALES-VKORG
 AND   VTWEG = WA_MATERIALES-VTWEG
 AND   DATBI &amp;gt;= SY-DATUM.

 IF  SY-SUBRC NE 0.
  SELECT SINGLE * FROM A304 INTO WA_A304
  WHERE KAPPL = 'V'
 AND   KSCHL = V_CONDICION   
 AND   MATNR = WA_MATERIALES-MATNR
 AND   VKORG = WA_MATERIALES-VKORG
 AND   VTWEG = WA_MATERIALES-VTWEG
 AND   DATBI &amp;gt;= SY-DATUM.
ELSE.
   WA_MATERIALES-ZPR0 = WA_A306-KNUMH.
 MODIFY I_IT_MATERIALES FROM WA_MATERIALES TRANSPORTING ZPR0.
  V_CONDICION = 'ZPR2'.



 ENDIF.
ENFORM.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;I get the follow error:&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;The specified type does not have a structure and therefore does not have a component called "ZPR0".&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/90266-error.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2017 05:36:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-in-a-subroutine/m-p/515174#M18267</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-11-29T05:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: Modify internal table in a subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-in-a-subroutine/m-p/515175#M18268</link>
      <description>&lt;P&gt;You didn't 'type' the parameter of the internal table, you didn't define any local variable, you didn't loop or read the internal table, you didn't explicitly provide the record to modify, no index, no key, in the internal tables, etc. &lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2017 06:29:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-in-a-subroutine/m-p/515175#M18268</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2017-11-29T06:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: Modify internal table in a subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-in-a-subroutine/m-p/515176#M18269</link>
      <description>&lt;P&gt;There is no type defined for Table I_IT_MATERIALS.&lt;/P&gt;
  &lt;P&gt;System is not getting the type for the same so you are getting error.&lt;/P&gt;
  &lt;P&gt;It might be working in the program because you have defined table I_IT_MATERIALS there itself so program was getting proper structure.&lt;/P&gt;
  &lt;P&gt;While taking the table into the subroutine,type the structure also.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2017 09:36:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-in-a-subroutine/m-p/515176#M18269</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-11-29T09:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: Modify internal table in a subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-in-a-subroutine/m-p/515177#M18270</link>
      <description>&lt;P&gt;In addition to all that was said here, try to avoid subroutines and move into classes as &lt;A href="https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapform.htm"&gt;subroutines are obsolete. In new programs, methods must be used instead.&lt;/A&gt;&lt;BR /&gt; &lt;/P&gt;
  &lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2017 17:13:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-in-a-subroutine/m-p/515177#M18270</guid>
      <dc:creator>iftah_peretz</dc:creator>
      <dc:date>2017-11-29T17:13:09Z</dc:date>
    </item>
  </channel>
</rss>

