<?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: building table dynamically in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/building-table-dynamically/m-p/2548679#M580059</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Felix , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Try the following blog:&lt;/P&gt;&lt;P&gt;/people/rich.heilman2/blog/2005/07/27/dynamic-internal-tables-and-structures--abap&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if helpful !&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ranjita&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Jul 2007 09:09:16 GMT</pubDate>
    <dc:creator>former_member196299</dc:creator>
    <dc:date>2007-07-10T09:09:16Z</dc:date>
    <item>
      <title>building table dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/building-table-dynamically/m-p/2548676#M580056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi folks!&lt;/P&gt;&lt;P&gt;Does anybody know whether it is possible to build an internal table from DDIC-structures dynamically?&lt;/P&gt;&lt;P&gt;I have a deep structured itab_upload(whose structure is defined in the DDIC), which contains 2 fields(Number Name) and a third field which contains itab_desc.&lt;/P&gt;&lt;P&gt;This itab_desc can contain either 2 fields(Number Name) and a third field which contains another itab_desc or 3 fields for numbers(without any other itab).If itab_desc contains another itab_desc, the second itab_desc contains only 3 fields for numbers and names...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;help will be very appreciated and points will be rewarded!&lt;/P&gt;&lt;P&gt;Felix&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2007 09:01:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/building-table-dynamically/m-p/2548676#M580056</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-10T09:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: building table dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/building-table-dynamically/m-p/2548677#M580057</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;check this link,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.sdn.sap.com/click.jspa?searchID=3750707&amp;amp;messageID=3487864" target="test_blank"&gt;https://forums.sdn.sap.com/click.jspa?searchID=3750707&amp;amp;messageID=3487864&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;seshu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2007 09:06:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/building-table-dynamically/m-p/2548677#M580057</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-10T09:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: building table dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/building-table-dynamically/m-p/2548678#M580058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Look bellow sample program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report  ytest.&lt;/P&gt;&lt;P&gt;data: lt_fieldcatalog type lvc_t_fcat.&lt;/P&gt;&lt;P&gt;data: ls_fieldcatalog type lvc_s_fcat.&lt;/P&gt;&lt;P&gt;field-symbols: &amp;lt;fs_data&amp;gt; type ref to data.&lt;/P&gt;&lt;P&gt;field-symbols: &amp;lt;fs_1&amp;gt;.&lt;/P&gt;&lt;P&gt;field-symbols: &amp;lt;fs_2&amp;gt; type any table.&lt;/P&gt;&lt;P&gt;field-symbols: &amp;lt;fs_3&amp;gt; type ypoll.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;data: lt_data type ref to data.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;assign lt_data to &amp;lt;fs_data&amp;gt;.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ls_fieldcatalog-fieldname = 'MANDT'.&lt;/P&gt;&lt;P&gt;ls_fieldcatalog-tabname   = 'LT_TAB'.&lt;/P&gt;&lt;P&gt;append ls_fieldcatalog to lt_fieldcatalog.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ls_fieldcatalog-fieldname = 'POLLID'.&lt;/P&gt;&lt;P&gt;ls_fieldcatalog-tabname   = 'LT_TAB'.&lt;/P&gt;&lt;P&gt;append ls_fieldcatalog to lt_fieldcatalog.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ls_fieldcatalog-fieldname = 'TEAM'.&lt;/P&gt;&lt;P&gt;ls_fieldcatalog-tabname   = 'LT_TAB'.&lt;/P&gt;&lt;P&gt;append ls_fieldcatalog to lt_fieldcatalog.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ls_fieldcatalog-fieldname = 'INITIATOR'.&lt;/P&gt;&lt;P&gt;ls_fieldcatalog-tabname   = 'LT_TAB'.&lt;/P&gt;&lt;P&gt;append ls_fieldcatalog to lt_fieldcatalog.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ls_fieldcatalog-fieldname = 'DESCRIPTION'.&lt;/P&gt;&lt;P&gt;ls_fieldcatalog-tabname   = 'LT_TAB'.&lt;/P&gt;&lt;P&gt;append ls_fieldcatalog to lt_fieldcatalog.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ls_fieldcatalog-fieldname = 'APPROVED'.&lt;/P&gt;&lt;P&gt;ls_fieldcatalog-tabname   = 'LT_TAB'.&lt;/P&gt;&lt;P&gt;append ls_fieldcatalog to lt_fieldcatalog.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ls_fieldcatalog-fieldname = 'INITIATED_DATE'.&lt;/P&gt;&lt;P&gt;ls_fieldcatalog-tabname   = 'LT_TAB'.&lt;/P&gt;&lt;P&gt;append ls_fieldcatalog to lt_fieldcatalog.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ls_fieldcatalog-fieldname = 'END_DATE'.&lt;/P&gt;&lt;P&gt;ls_fieldcatalog-tabname   = 'LT_TAB'.&lt;/P&gt;&lt;P&gt;append ls_fieldcatalog to lt_fieldcatalog.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ls_fieldcatalog-fieldname = 'WINNER'.&lt;/P&gt;&lt;P&gt;ls_fieldcatalog-tabname   = 'LT_TAB'.&lt;/P&gt;&lt;P&gt;append ls_fieldcatalog to lt_fieldcatalog.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&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           = lt_fieldcatalog&lt;/P&gt;&lt;P&gt;  importing&lt;/P&gt;&lt;P&gt;    ep_table                  = &amp;lt;fs_data&amp;gt;&lt;/P&gt;&lt;P&gt;  exceptions&lt;/P&gt;&lt;P&gt;    generate_subpool_dir_full = 1&lt;/P&gt;&lt;P&gt;    others                    = 2&lt;/P&gt;&lt;P&gt;        .&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;assign &amp;lt;fs_data&amp;gt;-&amp;gt;* to &amp;lt;fs_1&amp;gt;.&lt;/P&gt;&lt;P&gt;assign &amp;lt;fs_1&amp;gt; to &amp;lt;fs_2&amp;gt;.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;loop at &amp;lt;fs_2&amp;gt; assigning &amp;lt;fs_3&amp;gt;.&lt;/P&gt;&lt;P&gt;  write: &amp;lt;fs_3&amp;gt;-pollid.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Gaurav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2007 09:09:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/building-table-dynamically/m-p/2548678#M580058</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-10T09:09:01Z</dc:date>
    </item>
    <item>
      <title>Re: building table dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/building-table-dynamically/m-p/2548679#M580059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Felix , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Try the following blog:&lt;/P&gt;&lt;P&gt;/people/rich.heilman2/blog/2005/07/27/dynamic-internal-tables-and-structures--abap&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if helpful !&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ranjita&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2007 09:09:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/building-table-dynamically/m-p/2548679#M580059</guid>
      <dc:creator>former_member196299</dc:creator>
      <dc:date>2007-07-10T09:09:16Z</dc:date>
    </item>
    <item>
      <title>Re: building table dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/building-table-dynamically/m-p/2548680#M580060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;   hi,&lt;/P&gt;&lt;P&gt;try this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;===================================== &lt;/P&gt;&lt;P&gt;REPORT zmaschl_create_data_dynamic . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE-POOLS: slis. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: it_fcat TYPE slis_t_fieldcat_alv, &lt;/P&gt;&lt;P&gt;is_fcat LIKE LINE OF it_fcat. &lt;/P&gt;&lt;P&gt;DATA: it_fieldcat TYPE lvc_t_fcat, &lt;/P&gt;&lt;P&gt;is_fieldcat LIKE LINE OF it_fieldcat. &lt;/P&gt;&lt;P&gt;DATA: new_table TYPE REF TO data. &lt;/P&gt;&lt;P&gt;DATA: new_line TYPE REF TO data. &lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;l_table&amp;gt; TYPE ANY TABLE, &lt;/P&gt;&lt;P&gt;&amp;lt;l_line&amp;gt; TYPE ANY, &lt;/P&gt;&lt;P&gt;&amp;lt;l_field&amp;gt; TYPE ANY. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Build fieldcat &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE' &lt;/P&gt;&lt;P&gt;EXPORTING &lt;/P&gt;&lt;P&gt;i_structure_name = 'SYST' &lt;/P&gt;&lt;P&gt;CHANGING &lt;/P&gt;&lt;P&gt;ct_fieldcat = it_fcat[]. &lt;/P&gt;&lt;P&gt;LOOP AT it_fcat INTO is_fcat WHERE NOT reptext_ddic IS initial. &lt;/P&gt;&lt;P&gt;MOVE-CORRESPONDING is_fcat TO is_fieldcat. &lt;/P&gt;&lt;P&gt;is_fieldcat-fieldname = is_fcat-fieldname. &lt;/P&gt;&lt;P&gt;is_fieldcat-ref_field = is_fcat-fieldname. &lt;/P&gt;&lt;P&gt;is_fieldcat-ref_table = is_fcat-ref_tabname. &lt;/P&gt;&lt;P&gt;APPEND is_fieldcat TO it_fieldcat. &lt;/P&gt;&lt;P&gt;ENDLOOP. &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_fieldcat &lt;/P&gt;&lt;P&gt;IMPORTING &lt;/P&gt;&lt;P&gt;ep_table = new_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 Line with the same structure of the table. &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ASSIGN new_table-&amp;gt;* TO &amp;lt;l_table&amp;gt;. &lt;/P&gt;&lt;P&gt;CREATE DATA new_line LIKE LINE OF &amp;lt;l_table&amp;gt;. &lt;/P&gt;&lt;P&gt;ASSIGN new_line-&amp;gt;* TO &amp;lt;l_line&amp;gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Test it... &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DO 30 TIMES. &lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT 'SUBRC' OF STRUCTURE &amp;lt;l_line&amp;gt; TO &amp;lt;l_field&amp;gt;. &lt;/P&gt;&lt;P&gt;&amp;lt;l_field&amp;gt; = sy-index. &lt;/P&gt;&lt;P&gt;INSERT &amp;lt;l_line&amp;gt; INTO TABLE &amp;lt;l_table&amp;gt;. &lt;/P&gt;&lt;P&gt;ENDDO. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT &amp;lt;l_table&amp;gt; ASSIGNING &amp;lt;l_line&amp;gt;. &lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT 'SUBRC' OF STRUCTURE &amp;lt;l_line&amp;gt; TO &amp;lt;l_field&amp;gt;. &lt;/P&gt;&lt;P&gt;WRITE &amp;lt;l_field&amp;gt;. &lt;/P&gt;&lt;P&gt;ENDLOOP. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2007 09:10:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/building-table-dynamically/m-p/2548680#M580060</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-10T09:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: building table dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/building-table-dynamically/m-p/2548681#M580061</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;Check the following link:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/ab030.htm" target="test_blank"&gt;http://www.sap-img.com/ab030.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhaskar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2007 09:13:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/building-table-dynamically/m-p/2548681#M580061</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-10T09:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: building table dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/building-table-dynamically/m-p/2548682#M580062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Felix,&lt;/P&gt;&lt;P&gt;try this short example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETER: P_DBTAB LIKE DATABROWSE-TABLENAME DEFAULT 'MARA'.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;DATA:          GDO_DATA  TYPE REF TO DATA.&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;GT_ITAB&amp;gt; TYPE TABLE.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;CREATE DATA GDO_DATA TYPE TABLE OF (P_DBTAB).&lt;/P&gt;&lt;P&gt;ASSIGN GDO_DATA-&amp;gt;* TO &amp;lt;GT_ITAB&amp;gt;.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;SELECT * FROM (P_DBTAB) UP TO 100 ROWS INTO TABLE &amp;lt;GT_ITAB&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Dieter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2007 09:14:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/building-table-dynamically/m-p/2548682#M580062</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-10T09:14:46Z</dc:date>
    </item>
    <item>
      <title>Re: building table dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/building-table-dynamically/m-p/2548683#M580063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Found a way to work around this....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2007 08:27:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/building-table-dynamically/m-p/2548683#M580063</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-11T08:27:09Z</dc:date>
    </item>
  </channel>
</rss>

