cancel
Showing results for 
Search instead for 
Did you mean: 

Function Import

prabhu_04
Explorer
331

Why we don’t have Put operation in Function import?

DominikTylczyn
Active Contributor

You'd need to be just a tiny bit more specific, a really tiny bit, but still...

Accepted Solutions (0)

Answers (4)

Answers (4)

olegbash599
Active Participant

PUT / MERGE is methods that controlled by GateWay automatically. In case additional data will needed the GateWay will supply them by calling additional abap-method of the entity.

In case of Function Import we could have not any entity - just action with some data (parameters). From OData-protocol point of view it is service operation.

So it is hardly (I think impossible and not reasonable) to provide Idempotence for PUT-method by default. The difference between PUT and POST is that PUT is idempotent.

I think it is main reason.

So if you need idempotence for your entity by default - you should generate Entity or implement correspondent logic in execute_action. If you need fast POST - you can use function import which is really time-saving 🙂

Shruthisampath
Explorer
0 Kudos

We go for Function Import when the operations or business scenario are not achievable by CRUD operations. For Example, Say we have same field in 2 tables(Different Entitysets) which doesn't have any relationships, If we want to fetch the data based on one table to another then we will write this code in Function Import . Remember Function Imports are independent of Entitysets.

Shruthisampath
Explorer
0 Kudos

We go for Function Import when the operations or business scenario are not achievable by CRUD operations. For Example, Say we have same field in 2 tables(Different Entitysets) which doesn't have any relationships, If we want to fetch the data based on one table to another then we will write this code in Function Import . Remember Function Imports are independent of Entitysets.

Shruthisampath
Explorer
0 Kudos

We go for Function Import when the operations or business scenario are not achievable by CRUD operations. For Example, Say we have same field in 2 tables(Different Entitysets) which doesn't have any relationships, If we want to fetch the data based on one table to another then we will write this code in Function Import . Remember Function Imports are independent of Entitysets.