on 2021 Dec 21 9:38 PM
I've implemented an action on RAP, referring to the following help.
This BO is draft-enabled, managed scenario.
action set_complete result [1] $self;
METHOD set_complete.
"update status
MODIFY ENTITIES OF zi_person_m IN LOCAL MODE
ENTITY Person
UPDATE FIELDS ( Status )
WITH VALUE #( FOR key IN keys ( %tky = key-%tky
Status = 'C' ) ). "Complete
"read changed data for action result
READ ENTITIES OF zi_person_m IN LOCAL MODE
ENTITY person
ALL FIELDS WITH
CORRESPONDING #( keys )
RESULT DATA(persons).
result = VALUE #( FOR person IN persons ( %tky = person-%tky
%param = person ) ).
ENDMETHOD.<br>
The action button has been added to the UI. When I press the button, the action gets triggered and I can see in the debugger that result structure is filled with updated status.
However, the status filed doesn't get updated on the UI. When I checked the browser's network tab, in the response data of $batch request, the status field was empty, so as the DB table.
The following are the current situation as I see it.
1. The result structure is properly filled, but in $batch response status is empty
2. MODIFY ENTITES did not persist the updated status to the db
Does anyone know why this is happening?
Regards,
Mio
The issue has been resolved. The status field was added after the RAP BO had been generated.
So the mapping of status was missing in the behavior definition.
After I added status to the mapping, the action started to work.
mapping for ZPERSON_M
{
PersonUUID = PERSON_UUID;
FirstName = FIRST_NAME;
LastName = LAST_NAME;
Email = EMAIL;
Birthday = BIRTHDAY;
Status = STATUS;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
71 | |
11 | |
10 | |
10 | |
10 | |
8 | |
7 | |
7 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.