<?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: Error in Call Method 'create_dynamic_table'. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708766#M1453468</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes thats exactly what I was looking for.Its a good option that you have suggested,but have a look at the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*dynamic field value
    LOOP AT i_keph INTO w_keph WHERE kalnr = w_final-kalnr. "W_KEPH has just one line item
      ASSIGN COMPONENT  'KST001' OF STRUCTURE &amp;lt;i_value&amp;gt; TO &amp;lt;fs1&amp;gt;.
      &amp;lt;fs1&amp;gt; = &amp;lt;fs1&amp;gt; + w_keph-kst001. "how to dynamically assign a field of w_keph?
      ASSIGN COMPONENT  'KST002' OF STRUCTURE &amp;lt;i_value&amp;gt; TO &amp;lt;fs1&amp;gt;.
      &amp;lt;fs1&amp;gt; = &amp;lt;fs1&amp;gt; + w_keph-kst002.
      ASSIGN COMPONENT  'KST003' OF STRUCTURE &amp;lt;i_value&amp;gt; TO &amp;lt;fs1&amp;gt;.
      &amp;lt;fs1&amp;gt; = &amp;lt;fs1&amp;gt; + w_keph-kst003.
    ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now KSTXX have values from KST001-KST040,do I need to assign each field manually from W_KEPH?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Mar 2010 09:09:24 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-03-19T09:09:24Z</dc:date>
    <item>
      <title>Error in Call Method 'create_dynamic_table'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708745#M1453447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am working on Dynamic ALV.I have created a Dynamic Fieldcatalog,which is storing the correct field values as per requirement.&lt;/P&gt;&lt;P&gt;When I debbug the code: I get the following error when I am calling method 'create_dynamic_table'.&lt;/P&gt;&lt;P&gt;"Unable to interpret "MATERIALS(000010)". Possible 10 MATERIALS(000010)"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: g_table TYPE REF TO data.&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;CALL METHOD cl_alv_table_create=&amp;gt;create_dynamic_table
    EXPORTING
      it_fieldcatalog           = i_fieldcat
    IMPORTING
      ep_table                  = g_table.
*    EXCEPTIONS
*      generate_subpool_dir_full = 1
*      OTHERS                    = 2.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advice how do I approach this error.Is some change required in  my piece of code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Mar 2010 09:58:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708745#M1453447</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-18T09:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Call Method 'create_dynamic_table'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708746#M1453448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems that something is wrong with you fieldcatalog. Can you share it with us?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Mar 2010 10:02:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708746#M1453448</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2010-03-18T10:02:59Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Call Method 'create_dynamic_table'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708747#M1453449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Marcin Pciak,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the prompt reply.Please advice what could be the possible error.I am checking as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF i_fieldcat[] IS INITIAL.
    lcount = lcount + 1.
    w_fieldcat-fieldname   = 'WERKS'.
    w_fieldcat-seltext   = text-004.
    w_fieldcat-col_pos     = lcount.
    APPEND w_fieldcat TO i_fieldcat.
    CLEAR  w_fieldcat.

    lcount = lcount + 1.
    w_fieldcat-fieldname   = 'MATNR'.
    w_fieldcat-seltext   = text-005.
    w_fieldcat-col_pos     = lcount.
    APPEND w_fieldcat TO i_fieldcat.
    CLEAR  w_fieldcat.

    lcount = lcount + 1.
    w_fieldcat-fieldname   = 'MAKTX'.
    w_fieldcat-seltext   = text-006.
    w_fieldcat-col_pos     = lcount.
    APPEND w_fieldcat TO i_fieldcat.
    CLEAR  w_fieldcat.

    lcount = lcount + 1.
    w_fieldcat-fieldname   = 'MEINS'.
    w_fieldcat-seltext   = text-007.
    w_fieldcat-col_pos     = lcount.
    APPEND w_fieldcat TO i_fieldcat.
    CLEAR  w_fieldcat.

    lcount = lcount + 1.
    w_fieldcat-fieldname   = 'POPER'.
    w_fieldcat-seltext   = text-008.
    w_fieldcat-col_pos     = lcount.
    APPEND w_fieldcat TO i_fieldcat.
    CLEAR  w_fieldcat.

    lcount = lcount + 1.
    w_fieldcat-fieldname   = 'BDATJ'.
    w_fieldcat-seltext   = text-009.
    w_fieldcat-col_pos     = lcount.
    APPEND w_fieldcat TO i_fieldcat.
    CLEAR  w_fieldcat.

    SORT i_tckh3 BY el_hv.
    LOOP AT i_tckh3 INTO w_tckh3.
      SORT i_tckh1 BY elemt.
      LOOP AT i_tckh1 INTO w_tckh1 WHERE elemt = w_tckh3-elemt.
        lcount = lcount + 1.
        CONCATENATE w_tckh1-txele ' ' INTO w_fieldcat-seltext.
        CONCATENATE w_tckh1-txele ' ' INTO w_fieldcat-coltext.
        CONCATENATE w_tckh1-txele ' ' INTO w_fieldcat-fieldname.
*        CONDENSE w_fieldcat-fieldname NO-GAPS.
        w_fieldcat-col_pos = lcount.
        APPEND w_fieldcat TO i_fieldcat.
        CLEAR  w_fieldcat.
        CLEAR: w_tckh1.
      ENDLOOP.
      CLEAR:w_tckh3.
    ENDLOOP.

    lcount = lcount + 1.
    w_fieldcat-fieldname   = 'TOTAL'.
    w_fieldcat-seltext   = text-010.
    w_fieldcat-col_pos     = lcount.
    APPEND w_fieldcat TO i_fieldcat.
    CLEAR  w_fieldcat.

  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Mar 2010 10:09:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708747#M1453449</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-18T10:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Call Method 'create_dynamic_table'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708748#M1453450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This looks suspiscious&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    SORT i_tckh3 BY el_hv.
    LOOP AT i_tckh3 INTO w_tckh3.
      SORT i_tckh1 BY elemt.
      LOOP AT i_tckh1 INTO w_tckh1 WHERE elemt = w_tckh3-elemt.
        lcount = lcount + 1.
        CONCATENATE w_tckh1-txele ' ' INTO w_fieldcat-seltext.
        CONCATENATE w_tckh1-txele ' ' INTO w_fieldcat-coltext.
        CONCATENATE w_tckh1-txele ' ' INTO w_fieldcat-fieldname.
*        CONDENSE w_fieldcat-fieldname NO-GAPS.
        w_fieldcat-col_pos = lcount.
        APPEND w_fieldcat TO i_fieldcat.
        CLEAR  w_fieldcat.
        CLEAR: w_tckh1.
      ENDLOOP.
      CLEAR:w_tckh3.
    ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Don't know excatly what you appending here to field catalog. One thing which I can catch&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
"try
WRITE w_tchkh1-txele TO ... LEFT-JUSTIFIED.
"instead of 
CONCATENATE....
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Anyhow I suggest to comment this part and rerun the program to ensure that this one is not causing the error. If not then investigate further.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Mar 2010 10:15:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708748#M1453450</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2010-03-18T10:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Call Method 'create_dynamic_table'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708749#M1453451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I changed the code as per your suggestion,still the same error &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please advice.I have cross checked a number of posts on SDN,but all follow the same sequence,so I think i have not missed out on any point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Mar 2010 10:22:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708749#M1453451</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-18T10:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Call Method 'create_dynamic_table'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708750#M1453452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This works fine for me&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

DATA: i_fieldcat TYPE lvc_t_fcat,
      w_fieldcat TYPE lvc_s_fcat.

DATA: lcount TYPE i,
      g_table TYPE REF TO data.

lcount = lcount + 1.
w_fieldcat-fieldname   = 'WERKS'.
w_fieldcat-seltext   = text-004.
w_fieldcat-col_pos     = lcount.
APPEND w_fieldcat TO i_fieldcat.
CLEAR  w_fieldcat.

lcount = lcount + 1.
w_fieldcat-fieldname   = 'MATNR'.
w_fieldcat-seltext   = text-005.
w_fieldcat-col_pos     = lcount.
APPEND w_fieldcat TO i_fieldcat.
CLEAR  w_fieldcat.

lcount = lcount + 1.
w_fieldcat-fieldname   = 'MAKTX'.
w_fieldcat-seltext   = text-006.
w_fieldcat-col_pos     = lcount.
APPEND w_fieldcat TO i_fieldcat.
CLEAR  w_fieldcat.

lcount = lcount + 1.
w_fieldcat-fieldname   = 'MEINS'.
w_fieldcat-seltext   = text-007.
w_fieldcat-col_pos     = lcount.
APPEND w_fieldcat TO i_fieldcat.
CLEAR  w_fieldcat.

lcount = lcount + 1.
w_fieldcat-fieldname   = 'POPER'.
w_fieldcat-seltext   = text-008.
w_fieldcat-col_pos     = lcount.
APPEND w_fieldcat TO i_fieldcat.
CLEAR  w_fieldcat.

lcount = lcount + 1.
w_fieldcat-fieldname   = 'BDATJ'.
w_fieldcat-seltext   = text-009.
w_fieldcat-col_pos     = lcount.
APPEND w_fieldcat TO i_fieldcat.
CLEAR  w_fieldcat.

lcount = lcount + 1.
w_fieldcat-fieldname   = 'TOTAL'.
w_fieldcat-seltext   = text-010.
w_fieldcat-col_pos     = lcount.
APPEND w_fieldcat TO i_fieldcat.
CLEAR  w_fieldcat.


CALL METHOD cl_alv_table_create=&amp;gt;create_dynamic_table
  EXPORTING
    it_fieldcatalog           = i_fieldcat
  IMPORTING
    ep_table                  = g_table
  EXCEPTIONS
    generate_subpool_dir_full = 1
    OTHERS                    = 2.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Check it once again, if possible in some new program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Mar 2010 10:29:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708750#M1453452</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2010-03-18T10:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Call Method 'create_dynamic_table'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708751#M1453453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Still same error &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Mar 2010 10:48:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708751#M1453453</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-18T10:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Call Method 'create_dynamic_table'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708752#M1453454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check these OSS notes, maybe there is something which applies to your case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Note 454535 - ALV-TableCreate:generating length &amp;gt;80 char. for program line|https://websmp130.sap-ag.de/sap(bD1wbCZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=454535]&lt;/P&gt;&lt;P&gt;[Note 654306 - ALV grid: Field catalog entry intlen|https://websmp130.sap-ag.de/sap(bD1wbCZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=654306]&lt;/P&gt;&lt;P&gt;[Note 721628 - ALV: Dynamic table generation for decimal fields|https://websmp130.sap-ag.de/sap(bD1wbCZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=721628]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Mar 2010 11:18:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708752#M1453454</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2010-03-18T11:18:31Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Call Method 'create_dynamic_table'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708753#M1453455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When i commented the following code the error has gone:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*    SORT i_tckh3 BY el_hv.
*    LOOP AT i_tckh3 INTO w_tckh3.
*      SORT i_tckh1 BY elemt.
*      LOOP AT i_tckh1 INTO w_tckh1 WHERE elemt = w_tckh3-elemt.
*        lcount = lcount + 1.
*        WRITE w_tckh1-txele TO w_fieldcat-seltext LEFT-JUSTIFIED.
*        WRITE w_tckh1-txele TO w_fieldcat-coltext LEFT-JUSTIFIED.
*        WRITE w_tckh1-txele TO w_fieldcat-fieldname LEFT-JUSTIFIED.
*        w_fieldcat-col_pos = lcount.
*        APPEND w_fieldcat TO i_fieldcat.
*        CLEAR  w_fieldcat.
*        CLEAR: w_tckh1.
*      ENDLOOP.
*      CLEAR:w_tckh3.
*    ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any suggestions...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the main purpose of this Fieldcatalog is for Dynamic fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: p317980 on Mar 18, 2010 12:31 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Mar 2010 11:30:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708753#M1453455</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-18T11:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Call Method 'create_dynamic_table'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708754#M1453456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What you excatly store in these tables? Dynamic field names? If so please ensure that you are providing field names in CAPITALS and that you don't have duplicate entries after these two loops.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In debugger check also the content of the fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Marcin Pciak on Mar 18, 2010 12:35 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Mar 2010 11:35:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708754#M1453456</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2010-03-18T11:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Call Method 'create_dynamic_table'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708755#M1453457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I check this code in debug mode:G_TABLE is blank.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;* Create dynamic internal table and assign to FS
  CALL METHOD cl_alv_table_create=&amp;gt;create_dynamic_table
    EXPORTING
      it_fieldcatalog = i_fieldcat
    IMPORTING
      ep_table        = g_table
    EXCEPTIONS
      generate_subpool_dir_full = 1
      OTHERS                    = 2.


 ASSIGN g_table-&amp;gt;* TO &amp;lt;i_table&amp;gt;.
* Create dynamic work area and assign to FS
  CREATE DATA w_data LIKE LINE OF &amp;lt;i_table&amp;gt;.
  ASSIGN w_data-&amp;gt;* TO &amp;lt;i_value&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please advice.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Mar 2010 11:36:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708755#M1453457</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-18T11:36:40Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Call Method 'create_dynamic_table'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708756#M1453458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you mean, there is no reference stored in G_TABLE? Or you mean that table &amp;lt;i_table&amp;gt; is empty? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;G_TABLE musn't be blank if you are able to perform &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 ASSIGN g_table-&amp;gt;* TO &amp;lt;i_table&amp;gt;.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;It is the purpose of dynamic table creation to have empty table created but its structure is dynamic, meaning that based on fields provided in field catalog it will be generated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Mar 2010 11:41:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708756#M1453458</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2010-03-18T11:41:44Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Call Method 'create_dynamic_table'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708757#M1453459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I changed the FIELDNAME to UPPER CASE AS BELOW:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT i_tckh3 INTO w_tckh3.
      LOOP AT i_tckh1 INTO w_tckh1 WHERE elemt = w_tckh3-elemt.
        lcount = lcount + 1.
        WRITE w_tckh1-txele TO w_fieldcat-seltext LEFT-JUSTIFIED.
        WRITE w_tckh1-txele TO w_fieldcat-coltext LEFT-JUSTIFIED.
        WRITE w_tckh1-txele TO w_fieldcat-fieldname LEFT-JUSTIFIED.
        TRANSLATE w_fieldcat-fieldname TO UPPER CASE.
        w_fieldcat-col_pos = lcount.
        APPEND w_fieldcat TO i_fieldcat.
        CLEAR  w_fieldcat.
        CLEAR: w_tckh1.
      ENDLOOP.
      CLEAR:w_tckh3.
    ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the fieldcatalog stores the headings as per number of records in the loop.The data is coming correct in   i_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error still persists.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Mar 2010 11:46:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708757#M1453459</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-18T11:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Call Method 'create_dynamic_table'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708758#M1453460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any Suggestions ????&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Mar 2010 12:02:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708758#M1453460</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-18T12:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Call Method 'create_dynamic_table'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708759#M1453461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I viewed G_TABLE in debug mode:The following displays the results in debug mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;G_TABLE-&amp;gt;*       Standard Table[0x7(140)]&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I comment the loop in the fieldcatalog,then the error does not appear,But we have to define an Dynamic internal table,so we need to populate it through this procedure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have specified only the static fields in the internal table of the final ALV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you suggest some other option of doing the same??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Mar 2010 12:08:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708759#M1453461</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-18T12:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Call Method 'create_dynamic_table'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708760#M1453462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are these dynamic fields available in the DDIC? &lt;/P&gt;&lt;P&gt;I can see that you didn't type your dynamic fields in any way. Try giving reference to DDIC fields&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
w_fieldcatalog-ref_field = "name of field to take the type from
w_fieldcatalog-ref_table = "name of table this field is placed in
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You may try also providing data type directly by means of fields &lt;EM&gt;DATATYPE&lt;/EM&gt; , &lt;EM&gt;INTTYPE&lt;/EM&gt; , &lt;EM&gt;INTLEN&lt;/EM&gt; . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is really hard to tell what may cause the problem without seeing the content of these two misterious tables you have for dyncamic fields. Try adding just one field from these tables by looping only once, observe what is placed in the fieldcatalog and whether this is correct.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Mar 2010 12:14:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708760#M1453462</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2010-03-18T12:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Call Method 'create_dynamic_table'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708761#M1453463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all the prompt replies,I will try these changes first thing tomorrow.Will keep you posted on this.Am hoping that the issue should get resolved...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks once again!!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Mar 2010 16:35:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708761#M1453463</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-18T16:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Call Method 'create_dynamic_table'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708762#M1453464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have added the Ref_Field &amp;amp; Ref_Table in the fieldcatalog.Now the error message has changed to :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;"MATERIALS" is not expected 10 MATERIALS"&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please suggest what needs to be done.I am chekcing the code,the fields are getting updated in fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Mar 2010 04:57:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708762#M1453464</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-19T04:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Call Method 'create_dynamic_table'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708763#M1453465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you please paste here example values you have in the tables i_tckh3 and i_tckh1. I think this is crucial here. &lt;/P&gt;&lt;P&gt;You can print the ouput of this tables with WRITE statement and then just copy/paste it here, so I we can see couple rows of example data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Mar 2010 08:05:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708763#M1453465</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2010-03-19T08:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Call Method 'create_dynamic_table'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708764#M1453466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all the help,finally solved the issue.I made a small error while coding the Fieldcatalog:&lt;/P&gt;&lt;P&gt;now the changed code looks like the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT i_tckh3 INTO w_tckh3.
      LOOP AT i_tckh1 INTO w_tckh1 WHERE elemt = w_tckh3-elemt.
        lcount = lcount + 1.
        WRITE w_tckh1-txele TO w_fieldcat-seltext   LEFT-JUSTIFIED.
        CONCATENATE 'KST' w_tckh3-el_hv INTO w_fieldcat-fieldname.
        TRANSLATE w_fieldcat-fieldname              TO UPPER CASE.
        w_fieldcat-col_pos   =  lcount.
        w_fieldcat-ref_field = 'KST001'.
        w_fieldcat-ref_table = 'KEPH'.
        w_fieldcat-datatype  = 'CURR'.
        APPEND w_fieldcat TO i_fieldcat.
        CLEAR  w_fieldcat.
        CLEAR: w_tckh1.
      ENDLOOP.
      CLEAR:w_tckh3.
    ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Emphasis on the COncatenate statement in the loop.Earlier I was passing the TXELE field to fieldname,which was wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a Ton!!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a small dount in the next step:While assigning the values to the final internal table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT i_final INTO w_final.

    ASSIGN COMPONENT 'WERKS' OF STRUCTURE &amp;lt;i_value&amp;gt; TO &amp;lt;fs1&amp;gt;.
    &amp;lt;fs1&amp;gt; = w_final-werks.

    ASSIGN COMPONENT 'MATNR' OF STRUCTURE &amp;lt;i_value&amp;gt; to &amp;lt;fs1&amp;gt;.
    &amp;lt;fs1&amp;gt; = w_final-matnr.

     LOOP AT i_keph INTO w_keph WHERE kalnr = w_final-kalnr.
      ASSIGN COMPONENT  'KST001' OF STRUCTURE &amp;lt;i_value&amp;gt; TO &amp;lt;fs1&amp;gt;.
      &amp;lt;fs1&amp;gt; = &amp;lt;FS1&amp;gt; + w_keph-kst001.
    ENDLOOP.

   
    APPEND &amp;lt;i_value&amp;gt; TO &amp;lt;i_table&amp;gt;.
    CLEAR: &amp;lt;i_value&amp;gt;.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the LOOP AT I_KEPH: has all the values of the cost fields.I need to assign the appropriate value of KSTXXX to the corresponding Dynamic fieldcatalog:What should the procedure be.I am NOT able to check what values are there in dynamic calatog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this point is not too confusing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Mar 2010 08:22:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-call-method-create-dynamic-table/m-p/6708764#M1453466</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-19T08:22:25Z</dc:date>
    </item>
  </channel>
</rss>

