<?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: ABAP  Object  - Persistent Services -  Undelete in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-object-persistent-services-undelete/m-p/2022030#M413907</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Uwe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I will go down this direction. In my case, I don't have a user pressing a button, but do have a consumer of my BAPI / RFCs. In either case, the approach you suggested is workable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Mar 2007 09:34:57 GMT</pubDate>
    <dc:creator>AndrewBarnard</dc:creator>
    <dc:date>2007-03-19T09:34:57Z</dc:date>
    <item>
      <title>ABAP  Object  - Persistent Services -  Undelete</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-object-persistent-services-undelete/m-p/2022028#M413905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm developing some BAPIs according to the BAPI Programming Guidelines. I'm also using the Persistent Services to manage the persistence of my business object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The BAPI Programming Guidelines describe the Delete method as "deletes an instance of an SAP business object type from the database" I've implemented this using persistent services with method DELETE_PERSISTENT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to implement the undelete method. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;According to the documentation at &amp;lt;a href="http://help.sap.com/saphelp_nw04/helpdata/en/f5/a36828bc6911d4b2e80050dadfb92b/frameset.htm"&amp;gt;Management States&amp;lt;/a&amp;gt;, a persistent object deleted has state 4. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The state transition table suggests that the method CREATE_PERSISTENT can be applied to objects in state 4 - persistent deleted resulting in state 3 - persistent and has been changed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If before a commit work, I wish to "undelete" the object, how can I achieve this? Ideally, I'd like to simply provide the business key or GUID and request an "undelete"  on a deleted persistent object, of course before commit work has been triggered.  I do understand I can use CREATE_PERSISTENT to create the object - but this requires that attributes are provided again...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there an UNDO method?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Andrew Barnard&lt;/P&gt;&lt;P&gt;Additional clarification acknowledging the possibility of using the CREATE_PERSISTENT method.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2007 10:16:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-object-persistent-services-undelete/m-p/2022028#M413905</guid>
      <dc:creator>AndrewBarnard</dc:creator>
      <dc:date>2007-03-16T10:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP  Object  - Persistent Services -  Undelete</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-object-persistent-services-undelete/m-p/2022029#M413906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Andrew&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there is no UNDO (of the DELETE_PERSISTENT) possible then you could try a work-around:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;(1) User pushes button "Delete Instance of Business Object"
(2) Instead of directly calling method DELETE_PERSISTENT you could collect the instance in an itab of to-be-deleted instances.
(3) When the user finishes the transaction then you call indeed method DELETE_PERSISTENT for the collected instances.
(4) If the user wants to UNDO her actions the instances are removed from the list.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2007 11:42:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-object-persistent-services-undelete/m-p/2022029#M413906</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2007-03-16T11:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP  Object  - Persistent Services -  Undelete</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-object-persistent-services-undelete/m-p/2022030#M413907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Uwe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I will go down this direction. In my case, I don't have a user pressing a button, but do have a consumer of my BAPI / RFCs. In either case, the approach you suggested is workable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2007 09:34:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-object-persistent-services-undelete/m-p/2022030#M413907</guid>
      <dc:creator>AndrewBarnard</dc:creator>
      <dc:date>2007-03-19T09:34:57Z</dc:date>
    </item>
  </channel>
</rss>

