
In RAP, update is one of the standard operations. Standard operations are also known as CRUD operations, which is an acronym for create, read, update, delete.
While the read operation is always implicitly enabled for each entity listed in a CDS behavior, the modifying operations have to be listed explicitly to be available.
To enable standard operation update for an entity, add the update; statement to the entity behavior body (curly brackets after statement define behavior for …). To disable the operation, remove the statement or turn it into a comment.
In a managed scenario, the standard operations do not require an ABAP behavior pool, because they are completely handled by the RAP BO framework. In an unmanaged scenario, however, the standard operations must be implemented in the ABAP behavior pool.
Some interesting additions to statement update are as follows:
- Internal
Prefix which disables the operation for external consumers of the business object.
- Features: instance or features: global
Enable dynamic feature control. The decision, where and when the operation is enabled, is made dynamically in a behavior implementation.
- Precheck
A method is called before the update request to prevent unwanted changes from reaching the application buffer.

To make a standard operation update available in the OData Service, it has to be exposed in the behavior definition on projection level (behavior projection).
To include standard operation update in the OData service, add statement use update; to the entity behavior body (curly brackets after statement define behavior for …). To disable the operation, remove the statement or turn it into a comment.
Note
Behavior projections can have their own implementations, which can be used to augment the implementation of a standard operation or provide more prechecks. It is a special case that we don't cover in this class.
When the standard operation Update is available in the OData service, the service preview displays an Edit button on the Object Page for the related RAP BO entity. By choosing this button, the user enters an edit mode for the data displayed on the page.
Hint
After editing the behavior projection, you can press Ctrl + F5 to perform a hard refresh of the service preview before you can see the new button. Sometimes, you even have to clear your browsing data. (Press Ctrl + Shift + Del for that).








