Hello ABAP RAP Experts and Co-Learners,
I have a header BO entity with a child association to item BO entity. (1 header can contain multiple items)
All items of a header have a sorted rank (declared as read-only and automatically assigned a number in an incremental way during create operation of child entity).
Item-3, Hdr-01, Rank 1
Item-1, Hdr-01, Rank 2
Item-2, Hdr-01, Rank 3
In the event of a deletion of an item in draft mode, the sort/rank order of all items need to be checked and re-adjusted so that there are no gaps in the ranking order.
Trial Solution -
I tried to achieve the above by using a determination on modify for delete operation at item level and triggering an internal action on the header entity from the method.
I see that the underlying determination method is getting triggered fine. However, when I'm trying to read the header entity or item entities using the keys passed during the delete operation, there are no values retrieved.
READ ENTITIES OF i_test_entity IN LOCAL MODE
ENTITY _items BY \_header
ALL FIELDS WITH CORRESPONDING #( keys )