<?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: add record into dynamic table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-record-into-dynamic-table/m-p/2015664#M411870</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for your help,&lt;/P&gt;&lt;P&gt;when i write your code&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
        LOOP AT it_fldcat0.
          IF it_fldcat0-fieldname(1)  EQ 'V'.
            p_fld = it_fldcat0-fieldname.
            ASSIGN COMPONENT (p_fld) OF STRUCTURE &amp;lt;dyn_wa&amp;gt; TO &amp;lt;fs&amp;gt;.
            ASSIGN COMPONENT (p_fld) OF STRUCTURE &amp;lt;dyn_wa2&amp;gt; TO &amp;lt;f90&amp;gt;.
            &amp;lt;fs&amp;gt; = &amp;lt;f90&amp;gt; + &amp;lt;fs&amp;gt;.
          ENDIF.
        ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I obtain the error message :&lt;/P&gt;&lt;P&gt;Field "(P_FLD)" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement.		&lt;/P&gt;&lt;P&gt;So ... what can i do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Philippe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Mar 2007 22:55:39 GMT</pubDate>
    <dc:creator>philippe_gauthier</dc:creator>
    <dc:date>2007-03-21T22:55:39Z</dc:date>
    <item>
      <title>add record into dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-record-into-dynamic-table/m-p/2015662#M411868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello guru,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I create one program where i create two dynamics tables with this code.&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 = it_fldcat
    IMPORTING
      ep_table        = new_table.
  ASSIGN new_table-&amp;gt;* TO &amp;lt;dyn_table&amp;gt;.
*
* Create dynamic work area and assign to FS

  CREATE DATA new_line LIKE LINE OF &amp;lt;dyn_table&amp;gt;.
  ASSIGN new_line-&amp;gt;* TO &amp;lt;dyn_wa&amp;gt;.
* table des sommations
  CALL METHOD cl_alv_table_create=&amp;gt;create_dynamic_table
    EXPORTING
      it_fieldcatalog = it_fldcat
    IMPORTING
      ep_table        = new_table2.

  ASSIGN new_table2-&amp;gt;* TO &amp;lt;dyn_table2&amp;gt;.
  CREATE DATA new_line2 LIKE LINE OF &amp;lt;dyn_table2&amp;gt;.
  ASSIGN new_line2-&amp;gt;* TO &amp;lt;dyn_wa2&amp;gt;.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;as you can see the dyn_table and dyn_table2 are the &amp;lt;b&amp;gt;same structure &amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to aggregate the data that populate the first table into the second.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In first i try my dynamic table.&lt;/P&gt;&lt;P&gt;After, i do a loop into the dyn_table.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  LOOP AT &amp;lt;dyn_table&amp;gt; ASSIGNING &amp;lt;dyn_wa2&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;if it's the first record&lt;/P&gt;&lt;P&gt;-&amp;gt; i copy the line &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  &amp;lt;dyn_wa&amp;gt; = &amp;lt;dyn_wa2&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else if the n first characters are egals and if it's the first record, i would like to add the fields value into the line &amp;lt;dyn_wa&amp;gt;. (How ??? help), i try to do something like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
        LOOP AT it_fldcat0.
          IF it_fldcat0-fieldname(1)  EQ 'V'.
            p_fld = it_fldcat0-fieldname.
            CONCATENATE '&amp;lt;dyn_wa&amp;gt;-' p_fld INTO p_fld1.
            ASSIGN (p_fld) TO &amp;lt;fs&amp;gt;.
            CONCATENATE '&amp;lt;dyn_wa2&amp;gt;-' p_fld INTO p_fld1.
            ASSIGN (p_fld1) TO &amp;lt;f90&amp;gt;.
            ASSIGN COMPONENT p_fld OF STRUCTURE &amp;lt;dyn_wa&amp;gt; TO &amp;lt;fs&amp;gt;.
            &amp;lt;fs&amp;gt; = &amp;lt;f90&amp;gt; + &amp;lt;fs&amp;gt;.
          ENDIF.
        ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;the structure of my dynamic table is defined into the internal table it_fldcat0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the end i would like to add the result into the dynamic table &amp;lt;dyn_table2&amp;gt;, how do it please. Because when i write :&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
      ASSIGN &amp;lt;dyn_wa&amp;gt; TO &amp;lt;dyn_table2&amp;gt;.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I obtain a dump with the message &amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;UC_OBJECTS_NOT_CONVERTIBLE&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;or &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;ASSIGN_TYPE_CONFLICT&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your help,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Philippe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2007 22:22:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-record-into-dynamic-table/m-p/2015662#M411868</guid>
      <dc:creator>philippe_gauthier</dc:creator>
      <dc:date>2007-03-21T22:22:29Z</dc:date>
    </item>
    <item>
      <title>Re: add record into dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-record-into-dynamic-table/m-p/2015663#M411869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You will want to use the ASSIGN COMPONENT statement.  Something like this, but I haven't done this in the editor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;        LOOP AT it_fldcat0.
          IF it_fldcat0-fieldname(1)  EQ 'V'.
            p_fld = it_fldcat0-fieldname.
*            CONCATENATE '&amp;lt;dyn_wa&amp;gt;-' p_fld INTO p_fld1.
            assign component (p_fld) of structure &amp;lt;dyn_wa&amp;gt; to &amp;lt;fs&amp;gt;
*           ASSIGN (p_fld) TO &amp;lt;fs&amp;gt;.
*            CONCATENATE '&amp;lt;dyn_wa2&amp;gt;-' p_fld INTO p_fld1.
            assign component (p_fld1) of structure &amp;lt;dyn_wa&amp;gt; to &amp;lt;f90&amp;gt;
*            ASSIGN (p_fld1) TO &amp;lt;f90&amp;gt;.
*            ASSIGN COMPONENT p_fld OF STRUCTURE &amp;lt;dyn_wa&amp;gt; TO &amp;lt;fs&amp;gt;.
            &amp;lt;fs&amp;gt; = &amp;lt;f90&amp;gt; + &amp;lt;fs&amp;gt;.
          ENDIF.
        ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;RIch Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2007 22:31:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-record-into-dynamic-table/m-p/2015663#M411869</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-03-21T22:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: add record into dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-record-into-dynamic-table/m-p/2015664#M411870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for your help,&lt;/P&gt;&lt;P&gt;when i write your code&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
        LOOP AT it_fldcat0.
          IF it_fldcat0-fieldname(1)  EQ 'V'.
            p_fld = it_fldcat0-fieldname.
            ASSIGN COMPONENT (p_fld) OF STRUCTURE &amp;lt;dyn_wa&amp;gt; TO &amp;lt;fs&amp;gt;.
            ASSIGN COMPONENT (p_fld) OF STRUCTURE &amp;lt;dyn_wa2&amp;gt; TO &amp;lt;f90&amp;gt;.
            &amp;lt;fs&amp;gt; = &amp;lt;f90&amp;gt; + &amp;lt;fs&amp;gt;.
          ENDIF.
        ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I obtain the error message :&lt;/P&gt;&lt;P&gt;Field "(P_FLD)" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement.		&lt;/P&gt;&lt;P&gt;So ... what can i do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Philippe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2007 22:55:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-record-into-dynamic-table/m-p/2015664#M411870</guid>
      <dc:creator>philippe_gauthier</dc:creator>
      <dc:date>2007-03-21T22:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: add record into dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-record-into-dynamic-table/m-p/2015665#M411871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you declared the field p_fld ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : p_fld like dd03l-fieldname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aRs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2007 23:00:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-record-into-dynamic-table/m-p/2015665#M411871</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2007-03-21T23:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: add record into dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-record-into-dynamic-table/m-p/2015666#M411872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about spaces before and after P_FLD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;            ASSIGN COMPONENT ( p_fld ) OF STRUCTURE &amp;lt;dyn_wa&amp;gt; TO &amp;lt;fs&amp;gt;.
            ASSIGN COMPONENT ( p_fld ) OF STRUCTURE &amp;lt;dyn_wa2&amp;gt; TO &amp;lt;f90&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2007 23:06:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-record-into-dynamic-table/m-p/2015666#M411872</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-03-21T23:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: add record into dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-record-into-dynamic-table/m-p/2015667#M411873</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;with space, the error message is:&lt;/P&gt;&lt;P&gt;Unable to interpret "P_FLD". Possible causes of error: Incorrect spelling or comma error.		&lt;/P&gt;&lt;P&gt;I, of course, declare the variable p_fld.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reponse ... &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Philippe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2007 23:16:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-record-into-dynamic-table/m-p/2015667#M411873</guid>
      <dc:creator>philippe_gauthier</dc:creator>
      <dc:date>2007-03-21T23:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: add record into dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-record-into-dynamic-table/m-p/2015668#M411874</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;Please change like this way.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
       LOOP AT it_fldcat0.
          IF it_fldcat0-fieldname(1)  EQ 'V'.
            p_fld = it_fldcat0-fieldname.
            ASSIGN COMPONENT sy-tabix OF STRUCTURE &amp;lt;dyn_wa&amp;gt; TO &amp;lt;fs&amp;gt;.
            read table it_fldcat with key fieldname = p_fld.
            if sy-subrc eq 0.
              ASSIGN COMPONENT sy-tabix OF STRUCTURE &amp;lt;dyn_wa2&amp;gt; TO &amp;lt;f90&amp;gt;.
            endif.
            &amp;lt;fs&amp;gt; = &amp;lt;f90&amp;gt; + &amp;lt;fs&amp;gt;.
          ENDIF.
        ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aRs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2007 23:18:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-record-into-dynamic-table/m-p/2015668#M411874</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2007-03-21T23:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: add record into dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-record-into-dynamic-table/m-p/2015669#M411875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello thanks for your answer,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now i keep the dump when i do &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
ASSIGN &amp;lt;dyn_wa&amp;gt; TO &amp;lt;dyn_table2&amp;gt;.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;the error message is &amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;Type conflict in the ASSIGN statement in the program "ZCO_CDG_R1".&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;also in the dump i have this message:&lt;/P&gt;&lt;P&gt;&amp;lt;DYN_TABLE2&amp;gt;                   Table reference is destroyed&lt;/P&gt;&lt;P&gt;What is mean ?&lt;/P&gt;&lt;P&gt;thanks for your help,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Philippe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2007 23:28:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-record-into-dynamic-table/m-p/2015669#M411875</guid>
      <dc:creator>philippe_gauthier</dc:creator>
      <dc:date>2007-03-21T23:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: add record into dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-record-into-dynamic-table/m-p/2015670#M411876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How declared you field symbol ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for &amp;lt;DYN_TABLE2&amp;gt; if is "type any" can you change to "type standard table". &lt;/P&gt;&lt;P&gt;Keep all field symbols in same type. ie &amp;lt;f90&amp;gt; &amp;lt;dyn_table&amp;gt; &amp;lt;fs&amp;gt; etc&lt;/P&gt;&lt;P&gt;aRs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        aRs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2007 23:37:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-record-into-dynamic-table/m-p/2015670#M411876</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2007-03-21T23:37:10Z</dc:date>
    </item>
    <item>
      <title>Re: add record into dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-record-into-dynamic-table/m-p/2015671#M411877</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;I declared it with the same method.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

FIELD-SYMBOLS:
        &amp;lt;dyn_table&amp;gt; TYPE STANDARD TABLE,
        &amp;lt;dyn_table1&amp;gt; TYPE STANDARD TABLE,
        &amp;lt;dyn_table2&amp;gt; TYPE STANDARD TABLE,
         &amp;lt;dyn_wa&amp;gt;,
         &amp;lt;dyn_wa2&amp;gt;,
         &amp;lt;dyn_wa1&amp;gt;.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i don't understand the trouble&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Philippe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2007 05:36:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-record-into-dynamic-table/m-p/2015671#M411877</guid>
      <dc:creator>philippe_gauthier</dc:creator>
      <dc:date>2007-03-22T05:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: add record into dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-record-into-dynamic-table/m-p/2015672#M411878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I solve, the dump was due an error of the declaration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Philippe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2007 12:34:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-record-into-dynamic-table/m-p/2015672#M411878</guid>
      <dc:creator>philippe_gauthier</dc:creator>
      <dc:date>2007-03-22T12:34:36Z</dc:date>
    </item>
  </channel>
</rss>

