<?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 Error in move-corresponding with create data in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-move-corresponding-with-create-data/m-p/6144052#M1367460</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am writing a program which creates tranparent table dynamically and populates data to it.&lt;/P&gt;&lt;P&gt;I have created the transparent table dynamically.&lt;/P&gt;&lt;P&gt;I am fetching data using native sql, so the columns to be fetched are determined at run time.&lt;/P&gt;&lt;P&gt;At compile time,  I am getting warning for move-corresponding as &lt;/P&gt;&lt;P&gt;"LOS_DYN_TABLE" does not have a structured type.		&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run the program it gives a short dump.&lt;/P&gt;&lt;P&gt;With error&lt;/P&gt;&lt;P&gt;Error analysis&lt;/P&gt;&lt;P&gt;   The MOVE-CORRESPONDING statement can only be used on operands with a&lt;/P&gt;&lt;P&gt;   structured type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   In the case at hand, this condition is not fulfilled: Operand "LOS_DYN_TABLE"     has    the type "l".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In debug node, I have checked before loop, the structure types are compatible.&lt;/P&gt;&lt;P&gt;What are the possible solution to this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM populate_data_into_dyn_table
  USING    uv_dyn_crtd_table_name TYPE tabname " table created dynamically
           uot_legacy_data        TYPE REF TO data .
  DATA:
        lot_dyn_table     TYPE REF TO data ,
        los_dyn_table     TYPE REF TO data .

  FIELD-SYMBOLS:
      &amp;lt;fst_legacy_data&amp;gt; TYPE STANDARD TABLE ,
      &amp;lt;fst_dyn_table&amp;gt;   TYPE STANDARD TABLE ,
      &amp;lt;fss_legacy_wa&amp;gt;   TYPE ANY ,
      &amp;lt;fsv_dyn_fld&amp;gt;     TYPE ANY .

  " Do error checking.
  CREATE DATA lot_dyn_table TYPE STANDARD TABLE OF (uv_dyn_crtd_table_name).
  CREATE DATA los_dyn_table TYPE (uv_dyn_crtd_table_name).
  ASSIGN uot_legacy_data-&amp;gt;* TO &amp;lt;fst_legacy_data&amp;gt; .

  LOOP AT &amp;lt;fst_legacy_data&amp;gt; ASSIGNING &amp;lt;fss_legacy_wa&amp;gt;.
    MOVE-CORRESPONDING &amp;lt;fss_legacy_wa&amp;gt; TO los_dyn_table.
    append los_dyn_table to lot_dyn_table.	
  ENDLOOP.
endform.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vikas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Aug 2009 05:07:43 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-08-28T05:07:43Z</dc:date>
    <item>
      <title>Error in move-corresponding with create data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-move-corresponding-with-create-data/m-p/6144052#M1367460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am writing a program which creates tranparent table dynamically and populates data to it.&lt;/P&gt;&lt;P&gt;I have created the transparent table dynamically.&lt;/P&gt;&lt;P&gt;I am fetching data using native sql, so the columns to be fetched are determined at run time.&lt;/P&gt;&lt;P&gt;At compile time,  I am getting warning for move-corresponding as &lt;/P&gt;&lt;P&gt;"LOS_DYN_TABLE" does not have a structured type.		&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run the program it gives a short dump.&lt;/P&gt;&lt;P&gt;With error&lt;/P&gt;&lt;P&gt;Error analysis&lt;/P&gt;&lt;P&gt;   The MOVE-CORRESPONDING statement can only be used on operands with a&lt;/P&gt;&lt;P&gt;   structured type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   In the case at hand, this condition is not fulfilled: Operand "LOS_DYN_TABLE"     has    the type "l".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In debug node, I have checked before loop, the structure types are compatible.&lt;/P&gt;&lt;P&gt;What are the possible solution to this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM populate_data_into_dyn_table
  USING    uv_dyn_crtd_table_name TYPE tabname " table created dynamically
           uot_legacy_data        TYPE REF TO data .
  DATA:
        lot_dyn_table     TYPE REF TO data ,
        los_dyn_table     TYPE REF TO data .

  FIELD-SYMBOLS:
      &amp;lt;fst_legacy_data&amp;gt; TYPE STANDARD TABLE ,
      &amp;lt;fst_dyn_table&amp;gt;   TYPE STANDARD TABLE ,
      &amp;lt;fss_legacy_wa&amp;gt;   TYPE ANY ,
      &amp;lt;fsv_dyn_fld&amp;gt;     TYPE ANY .

  " Do error checking.
  CREATE DATA lot_dyn_table TYPE STANDARD TABLE OF (uv_dyn_crtd_table_name).
  CREATE DATA los_dyn_table TYPE (uv_dyn_crtd_table_name).
  ASSIGN uot_legacy_data-&amp;gt;* TO &amp;lt;fst_legacy_data&amp;gt; .

  LOOP AT &amp;lt;fst_legacy_data&amp;gt; ASSIGNING &amp;lt;fss_legacy_wa&amp;gt;.
    MOVE-CORRESPONDING &amp;lt;fss_legacy_wa&amp;gt; TO los_dyn_table.
    append los_dyn_table to lot_dyn_table.	
  ENDLOOP.
endform.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vikas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2009 05:07:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-move-corresponding-with-create-data/m-p/6144052#M1367460</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-28T05:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: Error in move-corresponding with create data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-move-corresponding-with-create-data/m-p/6144053#M1367461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    i_ref_descr ?= cl_abap_typedescr=&amp;gt;describe_by_data( &amp;lt;fss_legacy_wa&amp;gt; ).
    i_details[] = i_ref_descr-&amp;gt;components[].

 LOOP AT &amp;lt;fst_legacy_data&amp;gt; ASSIGNING &amp;lt;fss_legacy_wa&amp;gt;.
   loop at i_details into wa_details.
     assign component sy-tabix of structure &amp;lt;fss_legacy_wa&amp;gt; to &amp;lt;fs1&amp;gt;.
     assign component sy-tabix of structure los_dyn_table to &amp;lt;fs2&amp;gt;.
     move &amp;lt;fs1&amp;gt; to &amp;lt;fs2&amp;gt;.
   endloop.
    append los_dyn_table to lot_dyn_table.	
  ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2009 05:21:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-move-corresponding-with-create-data/m-p/6144053#M1367461</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2009-08-28T05:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: Error in move-corresponding with create data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-move-corresponding-with-create-data/m-p/6144054#M1367462</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>Tue, 20 Sep 2011 10:40:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-move-corresponding-with-create-data/m-p/6144054#M1367462</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-20T10:40:04Z</dc:date>
    </item>
  </channel>
</rss>

