Skip to Content
avatar image
Former Member

Handling of Draft documents using ODATA

Fiori elements support Draft documents. For example, you can create a draft product, then update it in various stages (the draft gets updated/merged in backend - o data supports it). This is done in SAP UI5 library which has a draftcontroller. I wanted to do the same thing using JAVA - calling the POST/MERGE on same o-data entities (and its associations).

Is there any existing library which I can use for this in Java? O-lingo doesn't really help much here - but any suggestions are welcome.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • May 04, 2017 at 10:45 AM

    Hi Vivek,

    I'm not sure if there is a difference in Java, the ODATA created for draft should handle everything.

    When Calling the OData, there is no difference between a normal OData and a Draft OData.

    Create Method of OData would create an entry in Draft.

    Update Method of OData would Update the Draft.

    Basically, all the Operations are based on draft table ( except Read, Read considers both Draft and Active Table ).

    Once you finish all the changes to your data, then we move it to Active Table by calling a function Import called Activation.

    Now the next time when you want to edit an existing entry( from Active Table), you call the EDIT Function Import. This will create a copy of the data in Draft Table and once you finish all your changes, its again moved to Active table using Activation Function Import.

    Hope this was your question.

    Regards,

    Pratheek

    Add comment
    10|10000 characters needed characters exceeded