<?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 reference comp in dynamic internal table using CL_ALV_TABLE_CREATE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reference-comp-in-dynamic-internal-table-using-cl-alv-table-create/m-p/1278647#M152190</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;I am using CL_ALV_TABLE_CREATE to create a dynamic internal table. Everything works fine, but there is one problem with it. How can i create a component in the internal table that is actually a REF TO a certain data type. i.e. later i would like to store a reference to some dataobj in this component of the internal table.&lt;/P&gt;&lt;P&gt;I cannot use cl_abap_*descr classes to create internal table because of some other reasons, otherwise it would have been easy to do it.&lt;/P&gt;&lt;P&gt;Any kind of help would be highly appreciated.&lt;/P&gt;&lt;P&gt;Thanks and best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ghufran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Mar 2006 16:41:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-03-22T16:41:03Z</dc:date>
    <item>
      <title>reference comp in dynamic internal table using CL_ALV_TABLE_CREATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reference-comp-in-dynamic-internal-table-using-cl-alv-table-create/m-p/1278647#M152190</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;I am using CL_ALV_TABLE_CREATE to create a dynamic internal table. Everything works fine, but there is one problem with it. How can i create a component in the internal table that is actually a REF TO a certain data type. i.e. later i would like to store a reference to some dataobj in this component of the internal table.&lt;/P&gt;&lt;P&gt;I cannot use cl_abap_*descr classes to create internal table because of some other reasons, otherwise it would have been easy to do it.&lt;/P&gt;&lt;P&gt;Any kind of help would be highly appreciated.&lt;/P&gt;&lt;P&gt;Thanks and best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ghufran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Mar 2006 16:41:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reference-comp-in-dynamic-internal-table-using-cl-alv-table-create/m-p/1278647#M152190</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-22T16:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: reference comp in dynamic internal table using CL_ALV_TABLE_CREATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reference-comp-in-dynamic-internal-table-using-cl-alv-table-create/m-p/1278648#M152191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ghufran,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't think this class will be able to handle the complex data type. It clearly can deal only with basic data types.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if you find a work around.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Mar 2006 17:11:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reference-comp-in-dynamic-internal-table-using-cl-alv-table-create/m-p/1278648#M152191</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-22T17:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: reference comp in dynamic internal table using CL_ALV_TABLE_CREATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reference-comp-in-dynamic-internal-table-using-cl-alv-table-create/m-p/1278649#M152192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ghufran,&lt;/P&gt;&lt;P&gt;I do have an idea about the class &amp;lt;b&amp;gt;CL_ALV_TABLE_CREATE&amp;lt;/b&amp;gt; , but i have writen an exmaple code to create a Dynamic Iternal table, please have a look, it may help you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Report  Z_DYNAMIC_INTERNALTABLE                                 *&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report  z_dynamic_internaltable             .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: d_ref type ref to data,&lt;/P&gt;&lt;P&gt;d_ref2 type ref to data ,&lt;/P&gt;&lt;P&gt;i_alv_cat type table of lvc_s_fcat,&lt;/P&gt;&lt;P&gt;ls_alv_cat like line of i_alv_cat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types tabname like dcobjdef-name .&lt;/P&gt;&lt;P&gt;parameter: p_tablen type tabname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab occurs 0.&lt;/P&gt;&lt;P&gt;include structure dntab.&lt;/P&gt;&lt;P&gt;data: end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;field-symbols : &amp;lt;f_fs&amp;gt; type table,&lt;/P&gt;&lt;P&gt;&amp;lt;f_fs1&amp;gt; type table,&lt;/P&gt;&lt;P&gt;&amp;lt;f_fs2&amp;gt; type any,&lt;/P&gt;&lt;P&gt;&amp;lt;f_fs3&amp;gt; type table,&lt;/P&gt;&lt;P&gt;&amp;lt;f_fs4&amp;gt; type any.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refresh itab.&lt;/P&gt;&lt;P&gt;call function 'NAMETAB_GET'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;langu = sy-langu&lt;/P&gt;&lt;P&gt;tabname = p_tablen&lt;/P&gt;&lt;P&gt;tables&lt;/P&gt;&lt;P&gt;nametab = itab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;exceptions&lt;/P&gt;&lt;P&gt;no_texts_found = 1.&lt;/P&gt;&lt;P&gt;loop at itab .&lt;/P&gt;&lt;P&gt;ls_alv_cat-fieldname = itab-fieldname.&lt;/P&gt;&lt;P&gt;ls_alv_cat-ref_table = p_tablen.&lt;/P&gt;&lt;P&gt;ls_alv_cat-ref_field = itab-fieldname.&lt;/P&gt;&lt;P&gt;append ls_alv_cat to i_alv_cat.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;internal table build&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 it_fieldcatalog = i_alv_cat&lt;/P&gt;&lt;P&gt;importing ep_table = d_ref .&lt;/P&gt;&lt;P&gt;assign d_ref-&amp;gt;* to &amp;lt;f_fs&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from (p_tablen) into corresponding fields of table &amp;lt;f_fs&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at &amp;lt;f_fs&amp;gt; assigning &amp;lt;f_fs2&amp;gt;.&lt;/P&gt;&lt;P&gt;assign itab-fieldname to &amp;lt;f_fs4&amp;gt;.&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;write: / &amp;lt;f_fs4&amp;gt;.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Mar 2006 17:20:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reference-comp-in-dynamic-internal-table-using-cl-alv-table-create/m-p/1278649#M152192</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-22T17:20:02Z</dc:date>
    </item>
  </channel>
</rss>

