on 2024 Apr 09 10:27 AM
I have a custom action which changes the status of a line item. Pressing the button for the custom action successfully changes the status but then it opens a blank object page (uuid full of 0s) in read only mode. How do I avoid this problem?
following is the custom action metadata extension.
@UI.lineItem: [ {
position: 10 ,
importance: #MEDIUM,
label: 'Invno'
},{
type : #FOR_ACTION,
dataAction: 'setInvnoAction',
label: 'Set Invno.'
} ]Behavior implementation
METHOD setinvnoaction.
MODIFY ENTITIES OF zr_10_inv_tab IN LOCAL MODE
ENTITY zr_10_inv_tab
UPDATE FIELDS ( status )
WITH VALUE #( FOR key IN keys
( %tky = key-%tky %cid_ref = key-%cid_ref status = 'X'
) ).
ENDMETHOD.Behavior definition
action setInvnoAction result[1] $self;
Request clarification before answering.
You have to either declare the action to not return a result or fill results if you have declared that it will return results. See the RAP tutorial for custom actions for how to fill result with the instance the action is acting on.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 6 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.