<?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: transient object to persistent in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/transient-object-to-persistent/m-p/2729575#M633560</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jorge,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what I was suggesting was to just call the create_persistent method with the attributes of the transient object except the business key. Then you will get a new business key for the persistent object. Then overwrite the reference to the transient object with the new persistent object reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MyTransientObject = Agent-&amp;gt;Create_Transient( ... )
...
MyPersistentObject = Agent-&amp;gt;Create_Persistent( ... ).
MyTransientObject ?= MyPersistentObject.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Graham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Sep 2007 23:48:58 GMT</pubDate>
    <dc:creator>GrahamRobbo</dc:creator>
    <dc:date>2007-09-13T23:48:58Z</dc:date>
    <item>
      <title>transient object to persistent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transient-object-to-persistent/m-p/2729570#M633555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I make persistent a previously created transient object? I mean, is there any other way of making it persistent instead of executing method CREATE_PERSISTENT( attributes ) ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
MyTransientObject = Agent-&amp;gt;Create_Transient( ... )
...
MyTransientObject-&amp;gt;MakePersistent( )
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Sep 2007 10:27:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transient-object-to-persistent/m-p/2729570#M633555</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-12T10:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: transient object to persistent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transient-object-to-persistent/m-p/2729571#M633556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jorge,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it seems not. I have just looked through the doco and has a quick play and I can't see any inbuilt method to do this. I guess you just need to code your own MakePersistent method to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Graham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Sep 2007 22:57:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transient-object-to-persistent/m-p/2729571#M633556</guid>
      <dc:creator>GrahamRobbo</dc:creator>
      <dc:date>2007-09-12T22:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: transient object to persistent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transient-object-to-persistent/m-p/2729572#M633557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Graham,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;unfortunately, if I try to create one persistent object from an already created transient object, an error occurs due to business key already is used by my transient object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Persistent and Transient objects verify if business key is already being used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it seems that is not possible to create persistent objects from transient ones.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this is correct, I don't know when to use transient objects, just for avoiding to create more than one object with same business key???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Sep 2007 08:13:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transient-object-to-persistent/m-p/2729572#M633557</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-13T08:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: transient object to persistent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transient-object-to-persistent/m-p/2729573#M633558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jorge,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you should be able to create a new persistent object with all the attributes of the transient object except the business key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You then just need to update the object reference to the transient key to point to the instance of the new persistent object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Graham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Sep 2007 08:59:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transient-object-to-persistent/m-p/2729573#M633558</guid>
      <dc:creator>GrahamRobbo</dc:creator>
      <dc:date>2007-09-13T08:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: transient object to persistent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transient-object-to-persistent/m-p/2729574#M633559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Graham,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think your solution will not work, I guess I can't create a persistent object without business key; even if this is possible, business key is not modifiable, its only allowed to set value to the business key in CONSTRUCTOR methods, there are no SET methods for it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Sep 2007 14:46:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transient-object-to-persistent/m-p/2729574#M633559</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-13T14:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: transient object to persistent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transient-object-to-persistent/m-p/2729575#M633560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jorge,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what I was suggesting was to just call the create_persistent method with the attributes of the transient object except the business key. Then you will get a new business key for the persistent object. Then overwrite the reference to the transient object with the new persistent object reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MyTransientObject = Agent-&amp;gt;Create_Transient( ... )
...
MyPersistentObject = Agent-&amp;gt;Create_Persistent( ... ).
MyTransientObject ?= MyPersistentObject.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Graham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Sep 2007 23:48:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transient-object-to-persistent/m-p/2729575#M633560</guid>
      <dc:creator>GrahamRobbo</dc:creator>
      <dc:date>2007-09-13T23:48:58Z</dc:date>
    </item>
  </channel>
</rss>

