2 weeks ago
Hello everyone, I have created an ODATA service(Service definition, Behavior Definition) to perform CRUD operations on a custom table.
Using SAP Gateway Client, I was able to create an entry into the custom table using the code below. I'm not sure how it works specifically on update and delete.
Here is my code for Behavior Definition:
managed implementation in class zcl_test unique;
strict(2);
define behavior for zv_test
persistent table z_custable
lockmaster
authorization master( instance )
{
create;
update;
delete;
action createUser result[1] $self;
}
Here for the class:
CLASS lhc_ZV_TEST DEFINITION INHERITING FROM cl_abap_behavior_handler.
PRIVATE SECTION.
METHODS get_instance_authorizations FOR INSTANCE AUTHORIZATION
IMPORTING keys REQUEST requested_authorizations for ZV_TEST RESULT result.
METHODS createUser FOR MODIFY
IMPORTING keys FOR ACTION zv_test-createUser RESULT result.
CLASS lhc_zv_test IMPLEMENTATION
METHOD createUser.
ENDMETHOD.
ENDCLASS.
My question is, how do i implement the update and delete? is it implemented in the behavior definition? I'm not really exposed to this RAP.
Request clarification before answering.
if it is managed, sap is doing those for you. if it is unmanaged, they have specific method for crud, just put your code there.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
73 | |
18 | |
9 | |
8 | |
7 | |
4 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.