Skip to Content
1
Nov 03, 2022 at 12:57 AM

Cannot read entities during delete operation of child entity in ABAP RAP (MANAGED DRAFT)

145 Views Last edit Nov 09, 2022 at 04:01 AM 4 rev

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).

For eg:

Hdr-01

Item-3, Hdr-01, Rank 1

Item-1, Hdr-01, Rank 2

Item-2, Hdr-01, Rank 3

Requirement -

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.

Problem -

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 )

RESULT DATA(lt_headers).