Wednesday - last edited Wednesday
Hi All,
I am working on a RAP Managed scenario with Unmanaged save. I have 2 actions as following,
I have checked the post https://community.sap.com/t5/technology-q-a/rap-action-does-not-update-the-instance/qaq-p/12531084 however the issue remains.
My action is,
action test result [1..*] $self;
My bdef mapping is,
create;
update;
action test result [1..*] $self;
action post;
mapping for zasset
{
message = message;
}
My action implementation is
METHOD test for MODIFY
IMPORTING keys FOR ACTION Asset~test RESULT result.
METHOD test .
MODIFY ENTITIES OF zasset IN LOCAL MODE
ENTITY Asset
UPDATE FIELDS ( message )
WITH VALUE #( FOR <fs> IN keys ( %tky = <fs>-%tky message = 'Test' ) )
FAILED DATA(lt_failed) REPORTED DATA(lt_reported) .
READ ENTITIES OF zasset IN LOCAL MODE
ENTITY Asset ALL FIELDS WITH CORRESPONDING #( keys ) RESULT DATA(lt_result) .
result = VALUE #( FOR <fs> IN lt_result ( %tky = <fs>-%tky %param = <fs> ) ) .
ENDMETHOD .
The requirement is to fill the message field with some messages after validating the keys whenever user clicks on the action TEST, like a simulation. The POST action is responsible for COMMIT to the database.
The result structure is having the updated value for the message field, however the response is not being updated either in browser or postman.
@Andre_Fischer, could you please help me here.
Why is the action cardinality [1..*], instead of [1] ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
68 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.