Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

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

Tags:
replied

Hi Marcel,

does it mean, that the feature described in DEV106 presentation of TechEd , which reference the interface /bobf/if_lib_draft is obsolete ?

Thank you for the information shared, this is very valueable for us, to take design decisions for our next BOPF based custom apps.

Attila

P.S.:

Paul, thanks for your info also.

What I've done actually at customer side on 7.4, that I've explicitly defined actions to create and activate draft version of the document (copying all the document data manually) in combination with alternative keys, which consist of the draft flag and the business key(like Document Number) of my object. So that the alternative key can be used in the GW entity, to differentiate between the active and draft version.

This is working fine so far, but as mentioned by Marcel, no native BOPF support, therefore I've to spend lot of time to copy content of the reusable dependent objects like text collection and attachment folder. What I did for locking, that I save the draft_user also, and when accessing documents, first I check for drafts using the alternative keys.  

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question