<?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: Declaring a sorted table from a dbtab in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-a-sorted-table-from-a-dbtab/m-p/12098131#M1972507</link>
    <description>&lt;P&gt; &lt;SPAN class="mention-scrubbed"&gt;gabmarian&lt;/SPAN&gt; Will the insert statement take care of duplicate entries too?&lt;/P&gt;</description>
    <pubDate>Thu, 21 Nov 2019 13:38:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2019-11-21T13:38:52Z</dc:date>
    <item>
      <title>Declaring a sorted table from a dbtab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-a-sorted-table-from-a-dbtab/m-p/12098126#M1972502</link>
      <description>&lt;P&gt;In the public section of my class, I have:&lt;/P&gt;
  &lt;P&gt;TYPES: ty_t_tadir_detail TYPE SORTED TABLE OF dbtab.&lt;/P&gt;
  &lt;P&gt;In the private section, I have:&lt;/P&gt;
  &lt;P&gt;DATA: gt_tadir_detail TYPE ty_t_tadir_detail.&lt;/P&gt;
  &lt;P&gt;When I try to activate, I get the error:&lt;/P&gt;
  &lt;P&gt;"TY_T_TADIR_DETAIL" is a generic type. Use this type only for typing field symbols and formal parameters.&lt;/P&gt;
  &lt;P&gt;How do I make a sorted table gt_tadir_detail from my dbtab, to be used as a class attribute?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 11:26:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-a-sorted-table-from-a-dbtab/m-p/12098126#M1972502</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-11-21T11:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: Declaring a sorted table from a dbtab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-a-sorted-table-from-a-dbtab/m-p/12098127#M1972503</link>
      <description>&lt;P&gt;You have to explicitly specify the keys for the table type, otherwise it will be considered generic:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;... TYPE SORTED TABLE OF dbtab [ WITH UNIQUE | NON-UNIQUE ] KEY components. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;It's irrelevant that the line type is a structure defined by a database table.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 11:32:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-a-sorted-table-from-a-dbtab/m-p/12098127#M1972503</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-11-21T11:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: Declaring a sorted table from a dbtab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-a-sorted-table-from-a-dbtab/m-p/12098128#M1972504</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;...TYPE SORTED TABLE OF dbtab WITH UNIQUE KEY f1 f2 f3.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This works perfectly. &lt;BR /&gt;I have a follow-up question: what would be the correct way to add new records into GT_TADIR_DETAIL table, while keeping the table sorted? (I've read in places that APPEND statements break the sorting/result in a dump) &lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 12:52:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-a-sorted-table-from-a-dbtab/m-p/12098128#M1972504</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-11-21T12:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: Declaring a sorted table from a dbtab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-a-sorted-table-from-a-dbtab/m-p/12098129#M1972505</link>
      <description>&lt;P&gt; &lt;SPAN class="mention-scrubbed"&gt;aveekbaruah&lt;/SPAN&gt; I have considered it as MARA table and tried below.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: ty_t_tadir_detail TYPE SORTED TABLE OF mara WITH NON-UNIQUE KEY matnr.
DATA: gt_tadir_detail LIKE ty_t_tadir_detail.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Nov 2019 13:09:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-a-sorted-table-from-a-dbtab/m-p/12098129#M1972505</guid>
      <dc:creator>ThangaPrakash</dc:creator>
      <dc:date>2019-11-21T13:09:36Z</dc:date>
    </item>
    <item>
      <title>Re: Declaring a sorted table from a dbtab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-a-sorted-table-from-a-dbtab/m-p/12098130#M1972506</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;aveekbaruah&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Forget about APPEND in case of non-standard tables (more so, I recommend to never use it), use INSERT instead. It will insert the new entry in the appropriate position respecting the keys.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 13:32:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-a-sorted-table-from-a-dbtab/m-p/12098130#M1972506</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-11-21T13:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: Declaring a sorted table from a dbtab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-a-sorted-table-from-a-dbtab/m-p/12098131#M1972507</link>
      <description>&lt;P&gt; &lt;SPAN class="mention-scrubbed"&gt;gabmarian&lt;/SPAN&gt; Will the insert statement take care of duplicate entries too?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 13:38:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-a-sorted-table-from-a-dbtab/m-p/12098131#M1972507</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-11-21T13:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: Declaring a sorted table from a dbtab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-a-sorted-table-from-a-dbtab/m-p/12098132#M1972508</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;aveekbaruah&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Yes. Refer to the &lt;A href="https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapinsert_itab.htm"&gt;documentation&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 13:47:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/declaring-a-sorted-table-from-a-dbtab/m-p/12098132#M1972508</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-11-21T13:47:12Z</dc:date>
    </item>
  </channel>
</rss>

