<?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 sorted table by using method create_dynamic_table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorted-table-by-using-method-create-dynamic-table/m-p/5861133#M1321476</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;l_table1&amp;gt; is defined as an sorted table and new_table from method create_dynamic_table is coming as standard table.&lt;/P&gt;&lt;P&gt;when we write a statement "ASSIGN new_table1-&amp;gt;* TO &amp;lt;l_table1&amp;gt;." Its giving runtime error type conflict.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please let me know how to create sorted internal table by using method create_dynamic_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create a new Table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL METHOD cl_alv_table_create=&amp;gt;create_dynamic_table&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      it_fieldcatalog = it_fieldcat1&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      ep_table        = new_table1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create a new Line with the same structure of the table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ASSIGN new_table1-&amp;gt;* TO &amp;lt;l_table1&amp;gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Jul 2009 09:07:38 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-07-20T09:07:38Z</dc:date>
    <item>
      <title>sorted table by using method create_dynamic_table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorted-table-by-using-method-create-dynamic-table/m-p/5861133#M1321476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;l_table1&amp;gt; is defined as an sorted table and new_table from method create_dynamic_table is coming as standard table.&lt;/P&gt;&lt;P&gt;when we write a statement "ASSIGN new_table1-&amp;gt;* TO &amp;lt;l_table1&amp;gt;." Its giving runtime error type conflict.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please let me know how to create sorted internal table by using method create_dynamic_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create a new Table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL METHOD cl_alv_table_create=&amp;gt;create_dynamic_table&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      it_fieldcatalog = it_fieldcat1&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      ep_table        = new_table1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create a new Line with the same structure of the table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ASSIGN new_table1-&amp;gt;* TO &amp;lt;l_table1&amp;gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2009 09:07:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorted-table-by-using-method-create-dynamic-table/m-p/5861133#M1321476</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-20T09:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: sorted table by using method create_dynamic_table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorted-table-by-using-method-create-dynamic-table/m-p/5861134#M1321477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt;Hi,
&amp;lt;li&amp;gt;&amp;lt;l_table1&amp;gt;and new_table1 should be declared like below.
&amp;lt;li&amp;gt;Fieldcatalog must be created before we call &lt;STRONG&gt;CALL METHOD cl_alv_table_create=&amp;gt;create_dynamic_table&lt;/STRONG&gt;.

&lt;PRE&gt;&lt;CODE&gt;    DATA:it_dyn_tab   TYPE REF TO data.
    "Filed symbols
    FIELD-SYMBOLS:&amp;lt;gt_table&amp;gt;   TYPE STANDARD TABLE.
    CALL METHOD cl_alv_table_create=&amp;gt;create_dynamic_table
      EXPORTING
        it_fieldcatalog = it_fcat
      IMPORTING
        ep_table        = it_dyn_tab.
    ASSIGN it_dyn_tab-&amp;gt;* TO &amp;lt;gt_table&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;

I hope that it helps u .

Thanks
Venkat.O&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2009 09:14:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorted-table-by-using-method-create-dynamic-table/m-p/5861134#M1321477</guid>
      <dc:creator>venkat_o</dc:creator>
      <dc:date>2009-07-20T09:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: sorted table by using method create_dynamic_table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorted-table-by-using-method-create-dynamic-table/m-p/5861135#M1321478</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;The code which you have sent me is working fine. but i want to have &amp;lt;gt_table&amp;gt; as sorted table not as standard table. I just wanted to use binary seach on &amp;lt;gt_table&amp;gt; and for that it needs to be sorted table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please help me with that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2009 09:35:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorted-table-by-using-method-create-dynamic-table/m-p/5861135#M1321478</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-20T09:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: sorted table by using method create_dynamic_table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorted-table-by-using-method-create-dynamic-table/m-p/5861136#M1321479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt;Hi,
&amp;lt;li&amp;gt;Difficult to define SORTED dynamic table because, We do not know the structure and fields until run time. For SORTED tables, We need to specify key fields. We do not know fields so defining key fields highly impossible.
&amp;lt;li&amp;gt;If you want to use addition BINARY SEARCH, We can even use that for STANDARD TABLES. 
&amp;lt;li&amp;gt;If the addition BINARY SEARCH is specified, the search is binary instead of linear. This considerably reduces the runtime of the search for larger tables (from approximately 100 entries upwards). 
&amp;lt;li&amp;gt;For the binary search, the table must be sorted by the specified search key in ascending order. Otherwise the search will not find the correct row.

Thanks
Venkat.O&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2009 10:24:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorted-table-by-using-method-create-dynamic-table/m-p/5861136#M1321479</guid>
      <dc:creator>venkat_o</dc:creator>
      <dc:date>2009-07-20T10:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: sorted table by using method create_dynamic_table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorted-table-by-using-method-create-dynamic-table/m-p/5861137#M1321480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is difficult to create a sorted internal table...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the below link which tells you how to do it...&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="138501"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if you have defined it as STANDARD TABLE then you can sort it using the below statement...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT &amp;lt;lt_tab&amp;gt; BY (c_fieldname).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope it helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2009 10:59:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorted-table-by-using-method-create-dynamic-table/m-p/5861137#M1321480</guid>
      <dc:creator>former_member212005</dc:creator>
      <dc:date>2009-07-20T10:59:20Z</dc:date>
    </item>
  </channel>
</rss>

