<?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 dynamic table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table/m-p/4879524#M1140477</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to insert dynamic table data into ztable.&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;purna,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Dec 2008 10:18:00 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-12-09T10:18:00Z</dc:date>
    <item>
      <title>dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table/m-p/4879524#M1140477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to insert dynamic table data into ztable.&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;purna,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Dec 2008 10:18:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table/m-p/4879524#M1140477</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-09T10:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table/m-p/4879525#M1140478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;REPORT zhashed_table .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of t_foo,&lt;/P&gt;&lt;P&gt;field1 type char2,&lt;/P&gt;&lt;P&gt;field2 type char2,&lt;/P&gt;&lt;P&gt;field3 type char2,&lt;/P&gt;&lt;P&gt;field4 type i,&lt;/P&gt;&lt;P&gt;end of t_foo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: lt_foo type HASHED TABLE OF t_foo&lt;/P&gt;&lt;P&gt;WITH UNIQUE KEY field1 field2 field3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: ls_foo like line of lt_foo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: like LINE OF lt_foo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Must assign it to use it.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;assign ls_foo to .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear .&lt;/P&gt;&lt;P&gt;-field1 = 'AB'.&lt;/P&gt;&lt;P&gt;-field2 = 'CD'.&lt;/P&gt;&lt;P&gt;-field3 = 'EF'.&lt;/P&gt;&lt;P&gt;-field4 = '2'.&lt;/P&gt;&lt;P&gt;insert into table lt_foo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear .&lt;/P&gt;&lt;P&gt;-field1 = 'AB'.&lt;/P&gt;&lt;P&gt;-field2 = 'CD'.&lt;/P&gt;&lt;P&gt;-field3 = 'EF'.&lt;/P&gt;&lt;P&gt;-field4 = '2'.&lt;/P&gt;&lt;P&gt;insert into table lt_foo.&lt;/P&gt;&lt;P&gt;If sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;write:/ ' this is the duplidate key'. &lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Dec 2008 10:20:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table/m-p/4879525#M1140478</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-09T10:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table/m-p/4879526#M1140479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;*---Internal Table Declaration&lt;/P&gt;&lt;P&gt;  data it_fieldmaster type standard table of zhdmsfieldmaster.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*---Work Area Declaration&lt;/P&gt;&lt;P&gt;  data wa_fieldmaster like line of it_fieldmaster.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*---Variable Declaration&lt;/P&gt;&lt;P&gt;  data: v_string type string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*---field symbol Declaration&lt;/P&gt;&lt;P&gt;  field-symbols: &amp;lt;f1&amp;gt; type any.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      concatenate 'wa_fieldmaster-' udffieldname into v_string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      condense v_string no-gaps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      assign (v_string) to &amp;lt;f1&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;f1&amp;gt; = udffieldvalue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      wa_fieldmaster-functionalareaid = functionalareaid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      append wa_fieldmaster to it_fieldmaster.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      insert into zhdmsfieldmaster values wa_fieldmaster.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Dec 2008 10:24:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table/m-p/4879526#M1140479</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-09T10:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table/m-p/4879527#M1140480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;u  can create a Dynamic Internal table .Just chek out this program . &lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;P&gt;  type-pools : abap. &lt;/P&gt;&lt;P&gt;  field-symbols: &amp;lt;dyn_table&amp;gt; type standard table, &lt;/P&gt;&lt;P&gt;               &amp;lt;dyn_wa&amp;gt;, &lt;/P&gt;&lt;P&gt;               &amp;lt;dyn_field&amp;gt;. &lt;/P&gt;&lt;P&gt;  data: dy_table type ref to data, &lt;/P&gt;&lt;P&gt;      dy_line  type ref to data, &lt;/P&gt;&lt;P&gt;      xfc type lvc_s_fcat, &lt;/P&gt;&lt;P&gt;      ifc type lvc_t_fcat. &lt;/P&gt;&lt;P&gt;  selection-screen begin of block b1 with frame. &lt;/P&gt;&lt;P&gt;parameters: p_table(30) type c default 'T001'. &lt;/P&gt;&lt;P&gt;selection-screen end of block b1. &lt;/P&gt;&lt;P&gt;  start-of-selection. &lt;/P&gt;&lt;P&gt;    perform get_structure. &lt;/P&gt;&lt;P&gt;  perform create_dynamic_itab.      *********&lt;STRONG&gt;Creates a dyanamic internal table&lt;/STRONG&gt;********* &lt;/P&gt;&lt;P&gt;  perform get_data. &lt;/P&gt;&lt;P&gt;  perform write_out. &lt;/P&gt;&lt;P&gt;  form get_structure. &lt;/P&gt;&lt;P&gt;  data : idetails type abap_compdescr_tab, &lt;/P&gt;&lt;P&gt;       xdetails type abap_compdescr. &lt;/P&gt;&lt;P&gt;  data : ref_table_des type ref to cl_abap_structdescr. &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the structure of the table. &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ref_table_des ?=  &lt;/P&gt;&lt;P&gt;      cl_abap_typedescr=&amp;gt;describe_by_name( p_table ). &lt;/P&gt;&lt;P&gt;  idetails[] = ref_table_des-&amp;gt;components[]. &lt;/P&gt;&lt;P&gt;    loop at idetails into xdetails. &lt;/P&gt;&lt;P&gt;    clear xfc. &lt;/P&gt;&lt;P&gt;    xfc-fieldname = xdetails-name . &lt;/P&gt;&lt;P&gt;    xfc-datatype = xdetails-type_kind. &lt;/P&gt;&lt;P&gt;    xfc-inttype = xdetails-type_kind. &lt;/P&gt;&lt;P&gt;    xfc-intlen = xdetails-length. &lt;/P&gt;&lt;P&gt;    xfc-decimals = xdetails-decimals. &lt;/P&gt;&lt;P&gt;    append xfc to ifc. &lt;/P&gt;&lt;P&gt;  endloop. &lt;/P&gt;&lt;P&gt;  endform. &lt;/P&gt;&lt;P&gt;  form create_dynamic_itab. &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create dynamic internal table and assign to FS &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 = ifc &lt;/P&gt;&lt;P&gt;               importing &lt;/P&gt;&lt;P&gt;                  ep_table        = dy_table. &lt;/P&gt;&lt;P&gt;    assign dy_table-&amp;gt;* to &amp;lt;dyn_table&amp;gt;. &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create dynamic work area and assign to FS &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  create data dy_line like line of &amp;lt;dyn_table&amp;gt;. &lt;/P&gt;&lt;P&gt;  assign dy_line-&amp;gt;* to &amp;lt;dyn_wa&amp;gt;. &lt;/P&gt;&lt;P&gt;  endform. &lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;P&gt;  form get_data. &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Select Data from table. &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  select * into table &amp;lt;dyn_table&amp;gt; &lt;/P&gt;&lt;P&gt;             from (p_table). &lt;/P&gt;&lt;P&gt;  endform. &lt;/P&gt;&lt;P&gt;   Write out data from table. &lt;/P&gt;&lt;P&gt;  loop at &amp;lt;dyn_table&amp;gt; into &amp;lt;dyn_wa&amp;gt;. &lt;/P&gt;&lt;P&gt;    do. &lt;/P&gt;&lt;P&gt;      assign component  sy-index   &lt;/P&gt;&lt;P&gt;         of structure &amp;lt;dyn_wa&amp;gt; to &amp;lt;dyn_field&amp;gt;. &lt;/P&gt;&lt;P&gt;      if sy-subrc &amp;lt;&amp;gt; 0. &lt;/P&gt;&lt;P&gt;        exit. &lt;/P&gt;&lt;P&gt;      endif. &lt;/P&gt;&lt;P&gt;      if sy-index = 1. &lt;/P&gt;&lt;P&gt;        write:/ &amp;lt;dyn_field&amp;gt;. &lt;/P&gt;&lt;P&gt;      else. &lt;/P&gt;&lt;P&gt;        write: &amp;lt;dyn_field&amp;gt;. &lt;/P&gt;&lt;P&gt;      endif. &lt;/P&gt;&lt;P&gt;    enddo. &lt;/P&gt;&lt;P&gt;  endloop. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it wud help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Dec 2008 10:25:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table/m-p/4879527#M1140480</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-09T10:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table/m-p/4879528#M1140481</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>Wed, 10 Dec 2008 07:43:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table/m-p/4879528#M1140481</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-10T07:43:23Z</dc:date>
    </item>
  </channel>
</rss>

