<?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: Nested sorted/hashed table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/nested-sorted-hashed-table/m-p/6664878#M1446871</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should use &lt;STRONG&gt;WITH key&lt;/STRONG&gt; and &lt;STRONG&gt;INITIAL SIZE&lt;/STRONG&gt; satementst with types, while declaring your structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES dtype { {TYPE tabkind OF [REF TO] type} &lt;/P&gt;&lt;P&gt;            | {LIKE tabkind OF dobj} } &lt;/P&gt;&lt;P&gt;            [WITH key] [INITIAL SIZE n]. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more details read F1 help of DATA and TYPES statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Mar 2010 11:50:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-03-17T11:50:34Z</dc:date>
    <item>
      <title>Nested sorted/hashed table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/nested-sorted-hashed-table/m-p/6664877#M1446870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone&lt;/P&gt;&lt;P&gt;Could any body give right solution for my doubt below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)I would like to create a nested sorted /hashed table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what i tried&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES : BEGIN OF tt_sflight,&lt;/P&gt;&lt;P&gt;   carrid TYPE sflight-carrid,&lt;/P&gt;&lt;P&gt;  connid TYPE sflight-connid,&lt;/P&gt;&lt;P&gt;  fldate TYPE sflight-fldate,&lt;/P&gt;&lt;P&gt;  price TYPE sflight-price,&lt;/P&gt;&lt;P&gt;  END OF tt_sflight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA it_sflight TYPE STANDARD TABLE OF tt_sflight INITIAL SIZE 2 WITH  KEY carrid connid fldate .&lt;/P&gt;&lt;P&gt;DATA jt_sflight LIKE SORTED TABLE OF it_sflight  WITH NON-UNIQUE KEY carrid connid fldate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This gives an error&lt;/P&gt;&lt;P&gt;A table without a header line has no components and therefore no component called "CARRID".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand  while using "with header line" line type cant be a table type.&lt;/P&gt;&lt;P&gt;So does that means a nested sorted table/hashed table is out of question?U cant create one???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please answer this&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Mar 2010 11:28:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/nested-sorted-hashed-table/m-p/6664877#M1446870</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-17T11:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: Nested sorted/hashed table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/nested-sorted-hashed-table/m-p/6664878#M1446871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should use &lt;STRONG&gt;WITH key&lt;/STRONG&gt; and &lt;STRONG&gt;INITIAL SIZE&lt;/STRONG&gt; satementst with types, while declaring your structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES dtype { {TYPE tabkind OF [REF TO] type} &lt;/P&gt;&lt;P&gt;            | {LIKE tabkind OF dobj} } &lt;/P&gt;&lt;P&gt;            [WITH key] [INITIAL SIZE n]. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more details read F1 help of DATA and TYPES statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Mar 2010 11:50:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/nested-sorted-hashed-table/m-p/6664878#M1446871</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-17T11:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: Nested sorted/hashed table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/nested-sorted-hashed-table/m-p/6664879#M1446872</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;When you use LIKE you should refer to the line TYPE (When your internal table doesn't have header line, system can't recognize the fields). Below are different solutions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Solution 1: Create line type and refer to that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA it_sflight TYPE STANDARD TABLE OF tt_sflight INITIAL SIZE 2 WITH KEY carrid connid fldate .
DATA: lwa_sflight TYPE tt_sflight.  "Line type/work area
DATA jt_sflight LIKE SORTED TABLE OF lwa_sflight WITH NON-UNIQUE KEY carrid connid fldate.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Solution 2: Use TYPE and refer to TYPEs definition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA it_sflight TYPE STANDARD TABLE OF tt_sflight INITIAL SIZE 2 WITH KEY carrid connid fldate .
DATA jt_sflight TYPE SORTED TABLE OF tt_sflight WITH NON-UNIQUE KEY carrid connid fldate.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check F1 help for more details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinod.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Mar 2010 11:54:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/nested-sorted-hashed-table/m-p/6664879#M1446872</guid>
      <dc:creator>vinod_vemuru2</dc:creator>
      <dc:date>2010-03-17T11:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: Nested sorted/hashed table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/nested-sorted-hashed-table/m-p/6664880#M1446873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Vinod...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Mar 2010 10:25:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/nested-sorted-hashed-table/m-p/6664880#M1446873</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-20T10:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: Nested sorted/hashed table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/nested-sorted-hashed-table/m-p/6664881#M1446874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Mar 2010 10:27:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/nested-sorted-hashed-table/m-p/6664881#M1446874</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-20T10:27:49Z</dc:date>
    </item>
  </channel>
</rss>

