Function Imports in OData and UI5
Function Imports:
Function imports are used to perform an action on a business object that can’t be executed by using CRUD-Q methods. An example of such an action is data retrieval of a different entity not directly in the context of a bound entity. Other examples including GetLongText, SaveLongText, ReleaseInspectionLot, setUsageDecision and ReleaseSalesOrder, performAvailablitiyCheck etc...
If a function import is read-only, GET should be used as the HTTP method. If POST is used, the framework checks for a CSRF token. Therefore function imports that perform changes should use the HTTP method POST.
Function imports are defined on the service level, not the entity set level. As a result, you must determine the name of the function import in the service implementation.
Define function import
By default all input parameters are mandatory however we can make it optional by checking the nullable column. There's a hidden field in the ALV-View of the parameter list. Just change the layout,
Comments
Post a Comment