<?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: Dinamyc table with deep table append in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dinamyc-table-with-deep-table-append/m-p/5955300#M1336798</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;APPEND i_consulta TO &amp;lt;f_tabla&amp;gt;.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;will work only of I_CONSULTA is of the same type as the structure of &amp;lt;F_TABLA&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If they are not the same then you &lt;STRONG&gt;cannot append I_CONSULTA to &amp;lt;F_TABLA&amp;gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do as follows:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Define a new data object and a field symbol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data : GV_OBJ type ref to data.
field-symbols : &amp;lt;F_WORKAREA&amp;gt; type any.

  CREATE DATA GV_OBJ LIKE LINE OF  &amp;lt;F_TABLA&amp;gt;.
  ASSIGN GV_OBJ-&amp;gt;* TO &amp;lt;F_WORKAREA&amp;gt;.
 
IF &amp;lt;F_WORKAREA&amp;gt; is assigned.

Move-corresponding I_CONSULTA to &amp;lt;F_WORKAREA&amp;gt;.

append &amp;lt;F_WORKAREA&amp;gt; to  &amp;lt;F_TABLA&amp;gt;.


ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope you get the concept.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ankur Parab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Aug 2009 13:15:18 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-08-17T13:15:18Z</dc:date>
    <item>
      <title>Dinamyc table with deep table append</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dinamyc-table-with-deep-table-append/m-p/5955297#M1336795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I`m a newy in troubles, probably it will be such an obvious problem but it's making me mad.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to append a flat line structure into a table with a generic type "ANY TABLE" created with RTTS, the code is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Method declaration&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;set_config_consulta IMPORTING value(i_consulta) TYPE tipo_output
                                        obj_lcl_ppal TYPE REF TO lcl_principal,&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Method implementation&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ASSIGN obj_lcl_ppal-&amp;gt;dinamic_tab-&amp;gt;* TO &amp;lt;f_tabla&amp;gt;

*I would need just to append this line in the corresponding fields of the table
APPEND i_consulta TO &amp;lt;f_tabla&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The i_consulta structure has a flat type while &amp;lt;ftabla&amp;gt; table has a table field type lvc_t_scol at the end of it's components, and that is the problem because a short dump is raised:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Err.tmpo.ejec.         OBJECTS_MOVE_NOT_SUPPORTED                           &lt;/P&gt;&lt;P&gt;Fecha y hora           17.08.2009 13:09:37                                  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Resume                                                               &lt;/P&gt;&lt;P&gt;     Conversion of type "TIPO_OUTPUT" to type "v" not supported.  &lt;/P&gt;&lt;P&gt;          &lt;/P&gt;&lt;P&gt;What happened?                                                          &lt;/P&gt;&lt;P&gt;     Error in the ABAP Application Program                                                                                &lt;/P&gt;&lt;P&gt;The current ABAP program "ZDDT04" had to be terminated because it has  &lt;/P&gt;&lt;P&gt;     come across a statement that unfortunately cannot be executed.         &lt;/P&gt;&lt;P&gt;                                                     &lt;/P&gt;&lt;P&gt;Error analisys                                                               &lt;/P&gt;&lt;P&gt;     You attempted to move one data object to another.                      &lt;/P&gt;&lt;P&gt;     This is not possible here because the conversion of a data object      &lt;/P&gt;&lt;P&gt;     of type "TIPO_OUTPUT" to type "v" is not supported.                                                                                &lt;/P&gt;&lt;P&gt;Any help would be really appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2009 11:21:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dinamyc-table-with-deep-table-append/m-p/5955297#M1336795</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-17T11:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: Dinamyc table with deep table append</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dinamyc-table-with-deep-table-append/m-p/5955298#M1336796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Do something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT itab assigning  &amp;lt;f_wA_ITAB&amp;gt;.
    REFRESH : color_tab[].


    CASE sy-tabix.
      WHEN 1.
        wa_color-fname = 'MATNR'.
        wa_color-color-col = 6.  " red color
        APPEND wa_color TO color_tab.

        wa_color-fname = 'MAKTX'.
        wa_color-color-col = 5. " green color
        APPEND wa_color TO color_tab.

      WHEN OTHERS.

        wa_color-fname = 'MATNR'.
        wa_color-color-col = 3. "yellow
        APPEND wa_color TO color_tab.

        wa_color-fname = 'MAKTX'.
        wa_color-color-col = 7. "violet
        APPEND wa_color TO color_tab.


    ENDCASE.
    INSERT LINES OF color_tab INTO TABLE &amp;lt;f_wA_ITAB&amp;gt;-colortab.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here &amp;lt;F_WA_ITAB&amp;gt; has a field which is of type LVC_T_SCOL.&lt;/P&gt;&lt;P&gt;I hope you get the concept.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ankur Parab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2009 11:33:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dinamyc-table-with-deep-table-append/m-p/5955298#M1336796</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-17T11:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: Dinamyc table with deep table append</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dinamyc-table-with-deep-table-append/m-p/5955299#M1336797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ankur, thank you for your quick response. Unfortunately I think I didn't explain myself correctly, I'm not having problems to define the table colors but just to store the importing parameter i_output into the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The importing parameter i_ouput has a flat type without the color column, the table assigned to the field symbol however has many more fields (it's dinamically defined with RTTS classes), but only one of them has a deep table structure (the color column, that has the lvc_t_scol).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm sure it's a simple thing that I'm actually missing but I don't see how to append that information to the table ^^.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: David Diaz on Aug 17, 2009 2:29 PM - corrected misstypes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2009 12:28:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dinamyc-table-with-deep-table-append/m-p/5955299#M1336797</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-17T12:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: Dinamyc table with deep table append</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dinamyc-table-with-deep-table-append/m-p/5955300#M1336798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;APPEND i_consulta TO &amp;lt;f_tabla&amp;gt;.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;will work only of I_CONSULTA is of the same type as the structure of &amp;lt;F_TABLA&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If they are not the same then you &lt;STRONG&gt;cannot append I_CONSULTA to &amp;lt;F_TABLA&amp;gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do as follows:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Define a new data object and a field symbol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data : GV_OBJ type ref to data.
field-symbols : &amp;lt;F_WORKAREA&amp;gt; type any.

  CREATE DATA GV_OBJ LIKE LINE OF  &amp;lt;F_TABLA&amp;gt;.
  ASSIGN GV_OBJ-&amp;gt;* TO &amp;lt;F_WORKAREA&amp;gt;.
 
IF &amp;lt;F_WORKAREA&amp;gt; is assigned.

Move-corresponding I_CONSULTA to &amp;lt;F_WORKAREA&amp;gt;.

append &amp;lt;F_WORKAREA&amp;gt; to  &amp;lt;F_TABLA&amp;gt;.


ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope you get the concept.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ankur Parab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2009 13:15:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dinamyc-table-with-deep-table-append/m-p/5955300#M1336798</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-17T13:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: Dinamyc table with deep table append</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dinamyc-table-with-deep-table-append/m-p/5955301#M1336799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much, it worked like a charm. You've made my day &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2009 15:23:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dinamyc-table-with-deep-table-append/m-p/5955301#M1336799</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-17T15:23:40Z</dc:date>
    </item>
  </channel>
</rss>

