Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
Showing results for 
Search instead for 
Did you mean: 

How to avoid short-dump in case of ABAP RAP actions with result cardinality [1..*]

0 Kudos

Hi colleagues,

I try to develop an ABAP RAP action with result cardinality [1..*]. I can define this inside the behavior definition without any error. For instance:

action ( features : instance ) SortOrderUp result [1..*] $self;

also the definition of the method inside the behavior definition ABAP class can be done w/o any error or waring. But if you try to run the OData Service you got an error message like this:

... for operation SortOrderUp not supported.

I debugged a little bit and found the reason in method CL_SADL_GW_ACTION_EXPOSURE~_CHECK_RETURN_ENTITY. There is a prevention that the result of a post http OData request can have multiple entities.

* POST function imports cannot return multiple entity instances

My intention is to implement an action where I can change the Sort Order of the whole table. I try to shift up one entity up and afterwards I have to change the SortOrder value for others. For instance:

Before Reordering:

1 Item A
2 Item B [button: SortOrderUp]
3 Item C

When I now press the button "SortOrderUp" in line 2 the result should be afterwards:

1 Item B
2 Item A
3 Item C.

I have to switch the SortOrder value for Item B and Item A with the action. And therefore I need a result with a cardinality of [1..*]. Or is there a other way for provided for such use-cases?

Thx for you support



Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Andreas,

sorting in Fiori Elements is done by clicking the column.

From what you want to achieve it rather sounds like you want a permanent re-ordering - right? So after reload of the page, the new order should be kept? In that case you should update the sort criteria when clicking the action, and via side effect you reload the table on the object page.

Best Regards, Volker