<?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: Types vs Data When Defining Structures in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/types-vs-data-when-defining-structures/m-p/9841021#M1785179</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Richard,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you create the structure using example 1, you have less memory consumption when you have a table and a field-symbols structure. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;TYPES&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;: BEGIN OF ts_my_stuff,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field1(15),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field2(15),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END OF ts_my_stuff.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff; font-family: 'courier new', courier;"&gt;TYPES: tt_my_stuff TYPE STANDARD TABLE OF ts_my_stuff.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff; font-family: 'courier new', courier;"&gt;DATA lt_my_stuff TYPE tt_my_stuff.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff; font-family: 'courier new', courier;"&gt;FIELD-SYMBOLS &amp;lt;fs_my_stuff&amp;gt; TYPE tt_my_stuff.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff; font-family: 'courier new', courier;"&gt;LOOP AT lt_my_stuff ASSIGNING &amp;lt;fs_my_stuff&amp;gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff; font-family: 'courier new', courier;"&gt;ENDLOOP.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;Next to this. There are no big advantages, but I would prefer the TYPES so I can attach it to any variable at all times.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;Good news that In 7.40 with the inline declaration, you have less worry's about this anymore.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;Best,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;Sander&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Nov 2013 22:44:32 GMT</pubDate>
    <dc:creator>former_member192854</dc:creator>
    <dc:date>2013-11-05T22:44:32Z</dc:date>
    <item>
      <title>Types vs Data When Defining Structures</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/types-vs-data-when-defining-structures/m-p/9841020#M1785178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had asked this once and they deleted it with the reason of FAQ but I looked through the FAQ and did not see anything in there that answered this question so I will ask again but shorten it up. TO ANY MODERATORS THAT FEEL THIS SHOULD BE DELETED: If I am wrong and this is in an FAQ somewhere, please oblige me and point me to the FAQ that answers this question before you delete it.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Consider the following statement from the Help files when looking at the help for DATA:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;The most important difference compared with the statement &lt;SPAN class="qtext"&gt;TYPES&lt;/SPAN&gt; is that a data type defined using &lt;SPAN class="qtext"&gt;DATA&lt;/SPAN&gt; (and not derived from an existing type) is available only as a property of the declared data object and is not independent. This kind &lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;of data type is bound to its data object.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am looking for a plain explanation on why there are two ways to create a structure, TYPES and DATA. Why not just one way? Now consider the following pieces of code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example 1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TYPES&lt;/STRONG&gt;: BEGIN OF My_Stuff,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field1(15),&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field2(15),&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END OF My_Stuff.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example 2:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DATA&lt;/STRONG&gt;: BEGIN OF My_Stuff,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field1(15),&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field2(15),&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END OF My_Stuff.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone fill in the blank on either of the two following statements:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you create the structure using example 1, you would be able to _________________ but would not be able to ___________________.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you create the structure using example 2, you would be able to _________________ but would not be able to ___________________.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, I know things defined with the DATA statement I understand are created in memory but why do I care about this? I can still reference fields in either one so why would this be a benefit or not? Just for performance?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Nov 2013 22:27:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/types-vs-data-when-defining-structures/m-p/9841020#M1785178</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-11-05T22:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: Types vs Data When Defining Structures</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/types-vs-data-when-defining-structures/m-p/9841021#M1785179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Richard,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you create the structure using example 1, you have less memory consumption when you have a table and a field-symbols structure. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;TYPES&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;: BEGIN OF ts_my_stuff,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field1(15),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field2(15),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END OF ts_my_stuff.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff; font-family: 'courier new', courier;"&gt;TYPES: tt_my_stuff TYPE STANDARD TABLE OF ts_my_stuff.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff; font-family: 'courier new', courier;"&gt;DATA lt_my_stuff TYPE tt_my_stuff.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff; font-family: 'courier new', courier;"&gt;FIELD-SYMBOLS &amp;lt;fs_my_stuff&amp;gt; TYPE tt_my_stuff.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff; font-family: 'courier new', courier;"&gt;LOOP AT lt_my_stuff ASSIGNING &amp;lt;fs_my_stuff&amp;gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff; font-family: 'courier new', courier;"&gt;ENDLOOP.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;Next to this. There are no big advantages, but I would prefer the TYPES so I can attach it to any variable at all times.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;Good news that In 7.40 with the inline declaration, you have less worry's about this anymore.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;Best,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;Sander&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Nov 2013 22:44:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/types-vs-data-when-defining-structures/m-p/9841021#M1785179</guid>
      <dc:creator>former_member192854</dc:creator>
      <dc:date>2013-11-05T22:44:32Z</dc:date>
    </item>
    <item>
      <title>Re: Types vs Data When Defining Structures</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/types-vs-data-when-defining-structures/m-p/9841022#M1785180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you. That makes sense in just the fact that "If defined under Types you can assign that structure to other variables". I can see using that part of it when creating something where I needed to compare things in multiple tables with an identical structure. If done with example 2 Id have to write it out twice. Thank you again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Nov 2013 23:41:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/types-vs-data-when-defining-structures/m-p/9841022#M1785180</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-11-05T23:41:35Z</dc:date>
    </item>
  </channel>
</rss>

