Skip to Content
Technical Articles

How to implement functions – Cloud Application Programming Model

Github repository:

https://github.com/miltonchandradas/mymtaproject (Branch: part6)

 

Introduction:

  • In this session, we will look at how to implement functions in Cloud Application Programming Model

 

Synopsis:

  • In OData specifications, Functions are operations exposed by an OData Service that must have no observable side effects
  • Functions must return data – If there are no side effects and if it doesn’t return any data then what is the point in having a function ?

 

Steps:

  • In this example, we will start off with creating a very simple function in Cloud Application Programming Model
  • We will then create a slightly more complex function
  • We start with 2 entities: Projects and Users
  • There is a 1 to many relationship between Projects and Users.  So a Project can have multiple Users, while a User can belong to only 1 Project
  • We will then create a function that returns the list of Users for a given Project

 

YouTube link:

 

 

Conclusion:

  • This video should give you a clear idea on how to implement functions in Cloud Application Programming Model
  • If you have any questions or comments, please list them below and I will be happy to answer

 

Next post:

https://blogs.sap.com/2020/08/23/how-to-implement-actions-cloud-application-programming-model/

 

Previous post:

https://blogs.sap.com/2020/08/23/how-to-debug-service-layer-custom-handlers-cloud-application-programming-model/

 

Be the first to leave a comment
You must be Logged on to comment or reply to a post.