cancel
Showing results for 
Search instead for 
Did you mean: 

Save draft entity from UI5

0 Kudos

Hi All,

I have crated BOPF with draft capability using CDS views and then generated the ODATA service on top of it as mentioned in sap help documentation. While testing this ODATA service from gateway client, I am only able to save the data in draft tables using POST operation. Can anybody suggest me how to save data in actual/persistence tables as well.

View Entire Topic
geert-janklaps
Active Contributor
0 Kudos

Hi,

In your root entity there should be an entity which is named in following format:

ROOTENTITYActivation (e.g. ZSD_C_SOHEADERActivation)

With this entity you can post the DraftUUID and actual document number and set value for IsActiveEntity to true. This will convert the draft into an active entity and update the actual tables.

Example based on my blog: https://blogs.sap.com/2019/03/11/creating-a-draft-enabled-sales-order-fiori-app-using-the-new-abap-p...

Screenshot generated using ABAP OpenAPI.

Best regards,

Geert-Jan Klaps

Hi Geert-Jan Klaps,

Your reply helped me to solve my problem.Yes there is a function import (e.g. zsd_c_soheaderActivation) for action ACTIVATION. As soon as I executed the action ACTIVATION by using below path, Draft has been saved in actual table.

Path: /sap/opu/odata/sap/ZSD_C_SOHEADER_CDS/zsd_c_soheaderActivation?vbeln=''&DraftUUID=guid'00000000-0000-0000-0000-000000000012'&IsActiveEntity=false

Thanks for your reply.

geert-janklaps
Active Contributor
0 Kudos

Hi,

Great to hear you managed to solve your issue!

Best regards,

Geert-Jan Klaps