<?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: Copy Objects in OO ABAP. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-objects-in-oo-abap/m-p/846560#M45346</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;o_pricecond&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;o_pricemat&amp;lt;/b&amp;gt; seem to be structured variables. Since they are declared with different types, a direct assignment is not possible. You can try using &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move-corresponding o_pricecond to o_pricemat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand Mandalika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 May 2005 10:30:24 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-05-04T10:30:24Z</dc:date>
    <item>
      <title>Copy Objects in OO ABAP.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-objects-in-oo-abap/m-p/846559#M45345</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;data: o_pricecond type zpricecond_struct.&lt;/P&gt;&lt;P&gt;data: o_pricemat type zpricematerial_struct.&lt;/P&gt;&lt;P&gt;..some code for filling objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I now have 2 different objects .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to copy all fields from one object to another. &lt;/P&gt;&lt;P&gt;The field names are the same...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This gives me an error!&lt;/P&gt;&lt;P&gt;o_pricemat = o_pricecond.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this isn't supported I will have to do like this:&lt;/P&gt;&lt;P&gt;o_pricemat-f1 = o_pricecond-f1.&lt;/P&gt;&lt;P&gt;o_pricemat-f2 = o_pricecond-f2.&lt;/P&gt;&lt;P&gt;o_pricemat-f3 = o_pricecond-f3.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;o_pricemat-f18 = 'MARTIN'&lt;/P&gt;&lt;P&gt;append o_pricemat to i_price_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's lots of coding...&lt;/P&gt;&lt;P&gt;//Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2005 09:42:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-objects-in-oo-abap/m-p/846559#M45345</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-04T09:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Objects in OO ABAP.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-objects-in-oo-abap/m-p/846560#M45346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;o_pricecond&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;o_pricemat&amp;lt;/b&amp;gt; seem to be structured variables. Since they are declared with different types, a direct assignment is not possible. You can try using &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move-corresponding o_pricecond to o_pricemat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand Mandalika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2005 10:30:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-objects-in-oo-abap/m-p/846560#M45346</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-04T10:30:24Z</dc:date>
    </item>
  </channel>
</rss>

