<?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: Switch between transient and persistent objects? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/switch-between-transient-and-persistent-objects/m-p/3188206#M759372</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Indeed, I completely understand the brick theory &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;  Time is not my friend either at the moment. Pity, as it's an interesting problem worth investigating in more detail. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I discovered one other problem with this approach: I'm also trying to handle this completely inside the object to encapsulate the persistent/transient state. The app shouldn't care or even know what state is being used. The idea is that whenever anyone writes to a transient object using a set_whatever( ) method it converts itself to persistent. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I recreate the object however, the reference to the old one must die before I can create a new one, so the app loses the link.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Catch 22?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Dec 2007 15:14:34 GMT</pubDate>
    <dc:creator>pokrakam</dc:creator>
    <dc:date>2007-12-13T15:14:34Z</dc:date>
    <item>
      <title>Switch between transient and persistent objects?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/switch-between-transient-and-persistent-objects/m-p/3188200#M759366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Folks, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm &lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="4107530"&gt;&lt;/A&gt; to ask this type of question, but couldn't find an answer. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using persistent classes, does anyone know an elegant way to convert a transient object to a persistent one and vice versa? There is no standard functionality provided that I can see, and cloning the object results in clashing keys. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I trying to accomplish? &lt;/P&gt;&lt;P&gt;I need an object instance which &amp;lt;i&amp;gt;may&amp;lt;/i&amp;gt; exist in the DB and if not, it &amp;lt;i&amp;gt;may&amp;lt;/i&amp;gt; need to be saved for future use. I'm using a table with key fields K1 and K2 and the app will ask for an object instance using the full key K1+K2. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the object doesn't find a DB record for K1&lt;EM&gt;K2 then it should instantiate itself with values for K1&lt;/EM&gt;blank. Here is where I'm considering transient in order to provide the app with default functionality defined in record K1+blank. &lt;/P&gt;&lt;P&gt;If a write access occurs to a transient object then is should become persistent and the K1+K2 record be created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas appreciated. &lt;/P&gt;&lt;P&gt;Cheers, &lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2007 11:46:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/switch-between-transient-and-persistent-objects/m-p/3188200#M759366</guid>
      <dc:creator>pokrakam</dc:creator>
      <dc:date>2007-12-13T11:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: Switch between transient and persistent objects?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/switch-between-transient-and-persistent-objects/m-p/3188201#M759367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mike,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can   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;P&gt;MyTransientObject = Agent-&amp;gt;Create_Transient( ... )&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;MyPersistentObject = Agent-&amp;gt;Create_Persistent( ... ).&lt;/P&gt;&lt;P&gt;MyTransientObject ?= MyPersistentObject.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Kindly reward points if you found the reply helpful.&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Chaitanya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2007 12:57:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/switch-between-transient-and-persistent-objects/m-p/3188201#M759367</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-13T12:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: Switch between transient and persistent objects?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/switch-between-transient-and-persistent-objects/m-p/3188202#M759368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well done on copying an irrelevant answer &amp;lt;b&amp;gt;from a link I provided&amp;lt;/b&amp;gt;. &lt;/P&gt;&lt;P&gt;Replies are appreciated, but please try to understand the problem first.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2007 13:13:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/switch-between-transient-and-persistent-objects/m-p/3188202#M759368</guid>
      <dc:creator>pokrakam</dc:creator>
      <dc:date>2007-12-13T13:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: Switch between transient and persistent objects?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/switch-between-transient-and-persistent-objects/m-p/3188203#M759369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mike,&lt;/P&gt;&lt;P&gt;I written something similar working on Persistent Objects.&lt;/P&gt;&lt;P&gt;The only point of attention is that you cannot create a new persistent while a transient is resident in memory.&lt;/P&gt;&lt;P&gt;This is checked by the OS system during the creation of a new persistent:&lt;/P&gt;&lt;P&gt;in method CREATE_PERSISTENT of Basis Class, there is a check on the existing object:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* Precondition   : No object exists with the given business key, neither
*                  in memory nor on database.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, you can create a new transient, fill it with the values you need and then pass this values to the agent to create a new persistent, but only after releasing the existing transient (because they will have the same key).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've solved the problem like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
METHOD flush.
 "IMPORTING value(im_transient) TYPE REF TO zcl_liquidate_daily_bo
 "IMPORTING value(im_commit) TYPE xfeld
 "IMPORTING value(im_agent) TYPE REF TO zca_liquidate_daily_bo
 "RETURNING value(re_persistent) TYPE REF TO zcl_liquidate_daily_bo
 "--&amp;gt; raised by event PERNR_PROCESSED

  DATA: s_dip_liq TYPE zhr_tm_dip_liq.

  s_dip_liq-zpernr    = im_transient-&amp;gt;get_employee_no( ).
  s_dip_liq-zsocmat   = im_transient-&amp;gt;get_matricola_legale( ).
  s_dip_liq-zdataev   = im_transient-&amp;gt;get_event_date( ).
  s_dip_liq-zcodev    = im_transient-&amp;gt;get_event_type( ).
  s_dip_liq-zdescev   = im_transient-&amp;gt;get_event_descr( ).
  s_dip_liq-zmotev    = im_transient-&amp;gt;get_event_reasn( ).
  s_dip_liq-zmeseall  = im_transient-&amp;gt;get_mese_allineamento( ).
  s_dip_liq-zannoall  = im_transient-&amp;gt;get_anno_allineamento( ).

* // Invalidate the transient before create the persistent!
  im_agent-&amp;gt;if_os_factory~release( im_transient ).
  CLEAR im_transient.

  IF im_commit EQ abap_true.
    TRY.
 re_persistent = 
 im_agent-&amp;gt;create_persistent( EXPORTING i_anno_allineamento = s_dip_liq-zannoall
                                               i_mese_allineamento = s_dip_liq-zmeseall
                                               i_employee_no       = s_dip_liq-zpernr
                                               i_event_date        = s_dip_liq-zdataev
                                               i_event_type        = s_dip_liq-zcodev
                                               i_event_descr       = s_dip_liq-zdescev
                                               i_event_reasn       = s_dip_liq-zmotev
                                               i_matricola_legale  = s_dip_liq-zsocmat ).
      CATCH cx_os_object_existing.
    ENDTRY.
    COMMIT WORK AND WAIT.
  ENDIF.


ENDMETHOD.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This method is called inside a loop on a table that containes references to transient objects.&lt;/P&gt;&lt;P&gt;For each object I perform some tasks, and if all it's ok I raise the event PERNR_PROCESSED, which automatically calls this method FLUSH, transferring the transient to the persistent.&lt;/P&gt;&lt;P&gt;Return Object is the new persistent, which will be passed back to the internal table, changing the content from the transient to the new persistent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Roby.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2007 13:33:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/switch-between-transient-and-persistent-objects/m-p/3188203#M759369</guid>
      <dc:creator>former_member199581</dc:creator>
      <dc:date>2007-12-13T13:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: Switch between transient and persistent objects?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/switch-between-transient-and-persistent-objects/m-p/3188204#M759370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Roby, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the input, looks similar to the last resort avenues I've been investigating. Agreed, the conflicting keys make this a bit messy. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To sum it up: read the entire internal state of a transient object, delete it, create a persitent and feed it all the saved data. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;More 'big hammer' than 'elegant' but if it works... I think I may try to implement it as transient_to_persistent( ) method in the agent class, will post back if it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll leave the thread open for a while to see if anyone has any better ideas. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, &lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2007 14:46:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/switch-between-transient-and-persistent-objects/m-p/3188204#M759370</guid>
      <dc:creator>pokrakam</dc:creator>
      <dc:date>2007-12-13T14:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: Switch between transient and persistent objects?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/switch-between-transient-and-persistent-objects/m-p/3188205#M759371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I know that this is not so "elegant", but I had not so much time and I solved with this "brick"! &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If fact, I tried to mask it using an event raise, but at the eyes of a developer...the hammer shows up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I can, I'll try to develop a transient_to_persistent too, so we can check solutions!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2007 15:04:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/switch-between-transient-and-persistent-objects/m-p/3188205#M759371</guid>
      <dc:creator>former_member199581</dc:creator>
      <dc:date>2007-12-13T15:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: Switch between transient and persistent objects?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/switch-between-transient-and-persistent-objects/m-p/3188206#M759372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Indeed, I completely understand the brick theory &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;  Time is not my friend either at the moment. Pity, as it's an interesting problem worth investigating in more detail. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I discovered one other problem with this approach: I'm also trying to handle this completely inside the object to encapsulate the persistent/transient state. The app shouldn't care or even know what state is being used. The idea is that whenever anyone writes to a transient object using a set_whatever( ) method it converts itself to persistent. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I recreate the object however, the reference to the old one must die before I can create a new one, so the app loses the link.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Catch 22?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2007 15:14:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/switch-between-transient-and-persistent-objects/m-p/3188206#M759372</guid>
      <dc:creator>pokrakam</dc:creator>
      <dc:date>2007-12-13T15:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: Switch between transient and persistent objects?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/switch-between-transient-and-persistent-objects/m-p/3188207#M759373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just to post back my big hammer solution: &lt;/P&gt;&lt;P&gt;Created agent methods MAKE_PERSISTENT and MAKE_TRANSIENT according to code similar to the above. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;During instantiation, the DB is checked. If only a partial match is found, the object is instantiated as transient with the full key. &lt;/P&gt;&lt;P&gt;The application must perform a &lt;/P&gt;&lt;P&gt;lv_myobj = zca_myclass=&amp;gt;agent-&amp;gt;make_persistent( lv_myobj )&lt;/P&gt;&lt;P&gt;before doing any modifications to the object. &lt;/P&gt;&lt;P&gt;Not elegant, but at least the big hammer portion is limited to one line of code in the caller. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternate suggestions are of course always welcome. &lt;/P&gt;&lt;P&gt;Cheers, &lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2007 12:20:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/switch-between-transient-and-persistent-objects/m-p/3188207#M759373</guid>
      <dc:creator>pokrakam</dc:creator>
      <dc:date>2007-12-17T12:20:54Z</dc:date>
    </item>
    <item>
      <title>Re: Switch between transient and persistent objects?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/switch-between-transient-and-persistent-objects/m-p/3188208#M759374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mike -- can't help you with the answer to your question but you have found the achilles heel of  using OO with essentially a relational DB system. An  OO related DB  (ODBMS) would have this problem neatly solved however there aren't many robust Object Orientated DB systems around - certainly not for Enterprise strength applications like SAP. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In slightly different contexts I've found when creating Objects it seems a pain that there is no way to store these in a DB on SAP (or not until recently and even then it's a cludge as if any of the relational components change how do you automatically update the stored object)  so you have to go through the whole process of instantiation and using the Constructor to re-create the attributes every time you want to (re-)use the object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An example might be a Sales order --but instead of the traditional VBAK, VBAP, etc etc with different relational tables stored in the sap system you might have set the entire component up as a complete object with all the items, partners, delivery lines, texts, customer, invoice details etc. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In an OO DB system you would simply save the object; Instantiation will retrieve you the whole package again without any extra coding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However if you apply this logic to the SAP system you can achieve some sort of object persistence --but if say a partner function  or another attribute changes you need to make sure that BOTH the object and the relational table are updated in sync or you will be up that very well known street without a paddle.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I like the idea of persistent objects but in it's present form I think it can be only of very limited use rather than in a real robust application. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suspect we'll here more on this topic as OO becomes more commonplace.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't as I've said answer your question but you might find this little diagression interesting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Someone from Sap Laps if they read this post might like to post a link on to the current thinking in using an ODBMS in a future release  of SAP . I can't see the current RDBMS (relational) system being phased out for a very long time if ever but there could be some degree of using both systems or even a hybrid type which contains aspects of both systems. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Jimbo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2007 15:32:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/switch-between-transient-and-persistent-objects/m-p/3188208#M759374</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-17T15:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: Switch between transient and persistent objects?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/switch-between-transient-and-persistent-objects/m-p/3188209#M759375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;gt; In slightly different contexts I've found when creating Objects it seems a pain that there is no way to store these in a DB on SAP (or not until recently and even then it's a cludge as if any of the relational components change how do you automatically update the stored object)  so you have to go through the whole process of instantiation and using the Constructor to re-create the attributes every time you want to (re-)use the object.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;Easily done, search for IF_SERIALIZABLE_OBJECT. Nevermind database, you can store the state of an entire ZCL_ORDER with ZCL_ORDER_ITEM subcomponents in a cookie. &lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; I like the idea of persistent objects but in it's present form I think it can be only of very limited use rather than in a real robust application. &lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;I actually think for the most part they have done a great job of it. I have a couple of gripes, one of the biggest being the division between persistent and transient states which is clumsy at best. Another is the way the of the DB access layer is implemented - far too embedded to do a huge amount of tweaking. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; I suspect we'll here more on this topic as OO becomes more commonplace.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;Definitely.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2007 16:00:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/switch-between-transient-and-persistent-objects/m-p/3188209#M759375</guid>
      <dc:creator>pokrakam</dc:creator>
      <dc:date>2007-12-17T16:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: Switch between transient and persistent objects?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/switch-between-transient-and-persistent-objects/m-p/3188210#M759376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mike --whilst we've diverged a bit from the original problem I still think there are problems in data integrity in storing a persistent object if any of the attributes change -- especially if these attributes can be maintained totally separately from object itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the sales order example I quoted above the partner functions / addresses can easily be changed via standard SAP transactions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I have a persistent object stored -- what mechanism do I have to use to ensure that the current attributes are identical to those just updated in SAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instantiating my "Object" should just retrieve the whole object from the persistent area. There shouldn't need to be any extra coding to recover attributes etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it has to re-calculate / obtain all the attributes again after instantiation then a significant benefit of saving the object as a persistent object is lost.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In an OBDMS if an attribute is chaged then the object itself is updated automatically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure how this would work in SAP given the relational nature of the underlying DB system&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm looking at some (Non SAP) OBDMS systems just for playing around with -- a good one if you are interested in testing on a home computer is db4objects&lt;/P&gt;&lt;P&gt;web site is  &lt;A href="http://www.db4o.com/Default.aspx?AspxAutoDetectCookieSupport=1" target="test_blank"&gt;http://www.db4o.com/Default.aspx?AspxAutoDetectCookieSupport=1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jimbo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2007 09:50:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/switch-between-transient-and-persistent-objects/m-p/3188210#M759376</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-19T09:50:38Z</dc:date>
    </item>
  </channel>
</rss>

