Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

RAP: Behavior definition for abstract entity

imihailovs
Explorer
0 Kudos

Hi experts,

A bit of interesting requirement from my side. I was tasked to develop and expose an OData API that calls a few BAPIs to create a few objects in the S4 backend (e.g. sales orders) together with quite a few lines of custom code. Now this would be a trivial task to do in RAP, however the caveat is - that there is no DB layer for custom data - API should literally just accept the data, execute BAPIs and return the BAPI result back to the consumer. 

Since the behavior definition is not allowed for abstract entities, do you have an idea on how this requirement can be realized in a gateway-like style, where I can just define a model for consumer to use, consumer then calls the endpoint with the necessary payload and I take over with behavior definition to execute necessary code?

Thank you,

Ilja.

1 REPLY 1

Ramjee_korada
Active Contributor

Hi,

You have to use custom entities but not abstract entities to achieve your requirements.

Please see the below blog 

https://community.sap.com/t5/technology-blogs-by-members/sap-abap-rap-custom-entities-with-compositi...

Best wishes,

Ramjee Korada