Skip to Content

How to achive saving draft BO entity ?

Dear Community Members,

we would like to use Business Objects in OData service. Since the OData service is based on REST protocol, we've no session memory between user interactions during updating the values through the UI. It means as soon as the user push the edit button, we need to keep the saved instance of the BO, but in addition save the changes done by the user, without memory in ABAP, so have no possibility to simply reset the changes.

This kind of Draft management is done using a darft flag as key in our tables. When user push the Edit button, we copy the active version(without draft flag) and set the draft flag in the copied table entries. All changes of the user is done on the draft version, and when the User push save, we delete the current active version, and remove the draft flag from the entries updated by teh user.

Do you know, how to cover this draft management requirement using BOPF, where the backend data is managed by BO, and have to be saved after each change, and both active and temporary version have to be managed ? My idea would be to copy the instance when the user push the edit button. To support this for example, Is there a default copy operation provided by the BOPF API ? Might not this is the best solution, just an idea. If you have better suggestion, just tell me 😊

Thank you,Attila

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    May 25, 2016 at 12:04 PM

    In my 7.5 system I can see the class /BOBF/CL_LIB_DRAFT which contains the four methods to handle saving documents as drafts and then moving the draft to the active object.

    How to use this in a BOPF definition escapes me. I can only presume this has not yet been released for us "customers"

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 29, 2016 at 05:59 PM

    Hi Attila,

    As BOPF becomes the framework for S4 HANA ABAP development and Fiori the UI technology for S4, SAP built the functionality you descriped. Maybe somebody from SAP can give you some insights on how they designed it.



    Add comment
    10|10000 characters needed characters exceeded

    • Hi Martin,

      I've already heard about it, that the Draft management will be implemented or is implemented in one of the SPs of 7.50. We are on 7.40, therefore not having several features like the above mentioned and have to manage manually. I'll ask someone about product roadmap whether this already delivered, and access a developer/trial version(available is 750 sp1) or a live system on higher level to check how this is implemented.

      Thanks for your proposal Martin