cancel
Showing results for 
Search instead for 
Did you mean: 

Handling of Draft documents using ODATA

0 Kudos

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.

Accepted Solutions (0)

Answers (1)

Answers (1)

pratheek_kv2
Explorer
0 Kudos

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

udayagiri_swamy
Newcomer
0 Kudos

Hi pratheek,

Can you help me with the draft creation using UI5 draft controller library