<?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: Dynamic internal table run time error. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-run-time-error/m-p/4751723#M1114463</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the problem comes up, when there are fields in the table which represent numbers with decimals (type p). Best is to reference the field directly what comes from SAP. Replace the LOOP At idetails ... ENDLOOP with:&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT idetails INTO xdetails.
    CLEAR xfc.
    xfc-fieldname = xfc-ref_field = xdetails-name .
    xfc-ref_table   = p_table.
*    xfc-datatype = xdetails-type_kind.
*    xfc-inttype = xdetails-type_kind.
*    xfc-intlen = xdetails-length.
*    xfc-decimals = xdetails-decimals.
    APPEND xfc TO ifc.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Nov 2008 16:45:25 GMT</pubDate>
    <dc:creator>JozsefSzikszai</dc:creator>
    <dc:date>2008-11-17T16:45:25Z</dc:date>
    <item>
      <title>Dynamic internal table run time error.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-run-time-error/m-p/4751720#M1114460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working on dynmaic internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have written the code from the SDN like this &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;For the table T001 it is working fine.&lt;/P&gt;&lt;P&gt;If i want get the table from from or any other table.It is giving runtime error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could body any know the solution please le me know&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Nov 2008 11:17:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-run-time-error/m-p/4751720#M1114460</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-14T11:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic internal table run time error.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-run-time-error/m-p/4751721#M1114461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi swapna &lt;/P&gt;&lt;P&gt;what  the error i find was that the database table size is more than the internal table size&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;say for e.g if you are passing table name T002 is not getting dumped .&lt;/P&gt;&lt;P&gt;but for tables like EKKO and SFLIGHT size is more than the internal tbale size.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;find out the ways for which u can increase the size of the Dynamic table.(dy_table)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mean while i try for the solution&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Nov 2008 06:40:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-run-time-error/m-p/4751721#M1114461</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-15T06:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic internal table run time error.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-run-time-error/m-p/4751722#M1114462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if i get the data only  10 rows only from the table it is going to dump.&lt;/P&gt;&lt;P&gt;what would be the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you get any solution for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If so please let me  know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Swapna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Nov 2008 16:17:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-run-time-error/m-p/4751722#M1114462</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-17T16:17:24Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic internal table run time error.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-run-time-error/m-p/4751723#M1114463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the problem comes up, when there are fields in the table which represent numbers with decimals (type p). Best is to reference the field directly what comes from SAP. Replace the LOOP At idetails ... ENDLOOP with:&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT idetails INTO xdetails.
    CLEAR xfc.
    xfc-fieldname = xfc-ref_field = xdetails-name .
    xfc-ref_table   = p_table.
*    xfc-datatype = xdetails-type_kind.
*    xfc-inttype = xdetails-type_kind.
*    xfc-intlen = xdetails-length.
*    xfc-decimals = xdetails-decimals.
    APPEND xfc TO ifc.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Nov 2008 16:45:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-run-time-error/m-p/4751723#M1114463</guid>
      <dc:creator>JozsefSzikszai</dc:creator>
      <dc:date>2008-11-17T16:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic internal table run time error.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-run-time-error/m-p/4751724#M1114464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Eric,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now also i am geeting dump.It is giving the error like output table is very small.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Swapna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Nov 2008 17:24:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-run-time-error/m-p/4751724#M1114464</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-17T17:24:23Z</dc:date>
    </item>
  </channel>
</rss>

