<?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: Cloning persistent objects in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/cloning-persistent-objects/m-p/5059564#M1175860</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have never tried the cloning of persistent object before. But it seems to be tedious task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, when we call the COMMIT WORK system internal calls the SAVE method in the Base Agent Class (ZCB* Class) through the Agent class object (Object of ZCA*). It loops through the attribute OBJECT_INFO. This table contains the reference to the Persistent class (ZCL_persistent).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now when we do the clone for persistent class ZCL_persistent in method IF_OS_CLONE~CLONE using the&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  SYSTEM-CALL OBJMGR CLONE me TO result.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;system will generate a new persistent object for us. But it doesn't link the cloned persistent object to the Agent class in the atrribute OBJECT_INFO. It is kind of dangling persistent object without any agent class. So, any change made to the cloned persistent object will not take place.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to find out a way to put the cloned object to the agent's attribute OBJECT_INFO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Jan 2009 15:48:13 GMT</pubDate>
    <dc:creator>naimesh_patel</dc:creator>
    <dc:date>2009-01-09T15:48:13Z</dc:date>
    <item>
      <title>Cloning persistent objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cloning-persistent-objects/m-p/5059563#M1175859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;im trying to clone objects which are bound to the sap persistency service. i've implemented the interface IF_OS_CLONE in my persistent class and it seems to work correctly, i can clone my objects. The actual problem is that they are not written into the database after i do a commit. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
client2 ?= client-&amp;gt;if_os_clone~clone( ).

COMMIT WORK AND WAIT.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do i have to call another method to do this or implement an additional interface? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2009 14:26:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cloning-persistent-objects/m-p/5059563#M1175859</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-09T14:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: Cloning persistent objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cloning-persistent-objects/m-p/5059564#M1175860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have never tried the cloning of persistent object before. But it seems to be tedious task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, when we call the COMMIT WORK system internal calls the SAVE method in the Base Agent Class (ZCB* Class) through the Agent class object (Object of ZCA*). It loops through the attribute OBJECT_INFO. This table contains the reference to the Persistent class (ZCL_persistent).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now when we do the clone for persistent class ZCL_persistent in method IF_OS_CLONE~CLONE using the&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  SYSTEM-CALL OBJMGR CLONE me TO result.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;system will generate a new persistent object for us. But it doesn't link the cloned persistent object to the Agent class in the atrribute OBJECT_INFO. It is kind of dangling persistent object without any agent class. So, any change made to the cloned persistent object will not take place.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to find out a way to put the cloned object to the agent's attribute OBJECT_INFO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2009 15:48:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cloning-persistent-objects/m-p/5059564#M1175860</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2009-01-09T15:48:13Z</dc:date>
    </item>
  </channel>
</rss>

