<?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 cl_alv_table_create=&amp;gt;create_dynamic_table 'Type is unknown' error in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-alv-table-create-gt-create-dynamic-table-type-is-unknown-error/m-p/7420541#M1549237</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to create dynamic table using the method 'cl_alv_table_create=&amp;gt;create_dynamic_table'. But when i execute this metod, i encounter an error message 'Type xx is unknown'. Below are my codes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __jive_macro_name="TYPES"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have this error message 'Type 'T_D_AR is unknown for T_D_AR-KUNNR'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone can help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your help will be much appreciated. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Oct 2010 03:40:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-10-26T03:40:03Z</dc:date>
    <item>
      <title>cl_alv_table_create=&gt;create_dynamic_table 'Type is unknown' error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-alv-table-create-gt-create-dynamic-table-type-is-unknown-error/m-p/7420541#M1549237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to create dynamic table using the method 'cl_alv_table_create=&amp;gt;create_dynamic_table'. But when i execute this metod, i encounter an error message 'Type xx is unknown'. Below are my codes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __jive_macro_name="TYPES"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have this error message 'Type 'T_D_AR is unknown for T_D_AR-KUNNR'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone can help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your help will be much appreciated. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Oct 2010 03:40:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-alv-table-create-gt-create-dynamic-table-type-is-unknown-error/m-p/7420541#M1549237</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-26T03:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: cl_alv_table_create=&gt;create_dynamic_table 'Type is unknown' error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-alv-table-create-gt-create-dynamic-table-type-is-unknown-error/m-p/7420542#M1549238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you are mixing things up&lt;/P&gt;&lt;P&gt;1. &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE DATA dataref TYPE (my_tab).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;DEL&gt;This will fail as system doesn't recognize MY_TAB as a global DDIC type (which it expects to receive here)&lt;/DEL&gt;&lt;/P&gt;&lt;P&gt;Sorry this is ok (you can type it locally), but still you don't need to generate data reference in order to create dynamic table, the below procedure is enough.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;descr_struct_ref ?= cl_abap_typedescr=&amp;gt;describe_by_data( &amp;lt;fs&amp;gt; ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If this was correctly executed you should generate &lt;EM&gt;table_descr_ref&lt;/EM&gt; using &lt;EM&gt;cl_abap_tabledescr&lt;/EM&gt; method &lt;EM&gt;create&lt;/EM&gt; . Then all you need is&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
create data dataref type handle table_descr_ref.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;... &lt;STRONG&gt;dataref&lt;/STRONG&gt; now points to a table, so no need to use &lt;EM&gt;cl_alv_table_create=&amp;gt;create_dynamic_table&lt;/EM&gt; anymore.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically you don't need point 1. You first need is to create data object from your type&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data my_d_ar type t_d_ar.

descr_struct_ref ?= cl_abap_typedescr=&amp;gt;describe_by_data( my_d_ar ).

..."then proceed as mentioned in point 2
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If you still don't feel comfortable with dynamic data generation I recommend reading [Do you really know everything about typing? - part 2|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/20887] &lt;B&gt;[original link is broken]&lt;/B&gt; &lt;B&gt;[original link is broken]&lt;/B&gt; &lt;B&gt;[original link is broken]&lt;/B&gt;;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Marcin Pciak on Oct 26, 2010 12:24 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Oct 2010 10:10:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-alv-table-create-gt-create-dynamic-table-type-is-unknown-error/m-p/7420542#M1549238</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2010-10-26T10:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: cl_alv_table_create=&gt;create_dynamic_table 'Type is unknown' error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-alv-table-create-gt-create-dynamic-table-type-is-unknown-error/m-p/7420543#M1549239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot, Marcin. Rewarded&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Oct 2010 09:01:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-alv-table-create-gt-create-dynamic-table-type-is-unknown-error/m-p/7420543#M1549239</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-27T09:01:14Z</dc:date>
    </item>
  </channel>
</rss>

