cancel
Showing results for 
Search instead for 
Did you mean: 

Upload functionality in CDS BOPF OData

dilipc85
Explorer

Hello Team,

I had created OData service through CDS-BOPF framework. oData Service got created with CDS Annotations @OData.publish:true.

My challenge is how to implement upload functionality such Excel upload.

In Normal case, oData Services created through SEGW, we can specify MIME Type, Content type and we can implement Mass upload features.

Can you please guide me, how to implement Upload Features through OData Services created through CDS-BOPF.

Thank you.

0 Kudos

Hi Dilip,

Were you able to achieve upload with CDS+BOPF framework?

Accepted Solutions (0)

Answers (3)

Answers (3)

somnath
Active Participant
0 Kudos

Hi Dilip,

locking can be done using durable lock by attaching annotations at your composite view as below:

lifecycle.enqueue:{

expiryBehavior:#RELATIVE_TO_ENQUEUE_START,

},

lifecycle.processing:{

expiryBehavior:#RELATIVE_TO_PROCESSING_START,

}

And yes, Andre suggested this would be for transactional apps with draft capabilities.

- Thanks, Som

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos
Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Dilip,

instead of the annotation @OData.publish : true you should use the Service Builder use the option to create an OData service based on the Referenced Data Source Approach.

Here a model- and data-provider-Extension class will be generated whose methods can be redefined.

See for example my blog

https://blogs.sap.com/2016/06/02/odata-service-development-with-sap-gateway-using-cds-via-referenced...

for more Details.

Regards,

Andre

dilipc85
Explorer
0 Kudos

Thank you. This is workaround solution. You mean that basic operation activities such as Create, Update, we can publish Odata service from annotations, for other complex things, we can use SEGW to get OData service generated.

Do you have any document or Blog related to locking functionality generated by CDS BOPF model ?. I had seen that there is action name LOCK_ZCDS_* in Root of business objects are generated. It also generate custom class such as ZCL_A_LOCK*

There is one method - LOCK_ACTIVE_ENTITY which does not have any code. Any suggestions whether we need specifically write custom code for locking mechanism.

After reading CDS BOPF framework, i came to know that framework will take locking part. But i want validate it. If you can guide on this, that will be great help.


Thank you.