cancel
Showing results for 
Search instead for 
Did you mean: 

Issue Activate Draft with "Recreated" records in RAP Managed

BhargavaReddy
Active Participant
0 Kudos

Hello Experts,
I have faced one issue when activating the draft in the RAP managed scenario (OP2020).

Let's take two tables Order & Positions Tables and key fields

OrderNumber

10001

Position Table: OrderNumber, PositionNumber

10001, 10

10001, 20

here I was changed the active record 10001 and saved it as a draft. in this process first, I deleted position 20 and saved it as a draft later I recreated position 20 with different data(not as the previous record).

and seems to Draft OperatonMode(DraftEntityOperationCode) as "Recreated" for position 20 in the draft table.

Now I activated the draft table but position 20 is not updated but instead, that position 20 record was deleted from the Active Table. due to this, we lost data in the Active Table.


But in the Unmanaged scenario, they giving all data to us to update Active Table. so no issue there.

Is it a bug in RAP managed scenario? Or

Is there something I need to do in our side to fix issue?

Accepted Solutions (1)

Accepted Solutions (1)

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Bhargava,

it's not a bug, it's a feature.

The draft object is not only the single line item object but the whole BO.
When creating or editing the items you will see that there are entries in the draft table of the root entity as well.

So I have built a draft enabled BO (using my RAP Generator ;-)) and was able to perform the same steps you described.

  1. I have a travel BO with 2 bookings.
  2. I delete the booking #20 which has the booking date Oct 15th.
  3. We check the content of the draft tables. (For this I had to create two CDS views since the preview F8 does not work for draft tables.

  1. Now I create a new entry in the booking table with the key 20. But this time with booking date Nov. 5th.
  2. We again check the draft tables
  3. But now I press cancel
  4. In the end the original booking 020 with booking date Oct 15th is shown in the UI.

If you would like to change the booking 020 you would have to edit the entry, not delete it.

BhargavaReddy
Active Participant
0 Kudos

Hello Andre,

Thanks a lot for your response😉.

Yes, this is a good feature and I hope so too. I checked in the cloud system (trail) and it's working just like you said.

But in my case, it was not working properly on the OP system (released in early 2020).

Is that functionality support in the release OP2020?

Thank You.

Bhargava

Answers (1)

Answers (1)

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos

I am working on an answer.