cancel
Showing results for 
Search instead for 
Did you mean: 

How to avoid empty drafts in RAP?

Bohdan
Active Contributor
0 Kudos
284

Hi Experts, 

I'm experimenting with RAP-model. I've implemented a sample RAP BO (managed implementation), where I try to create custom rules in a Z-table. I have two tables: persistent table & a draft table. So far, everything works fine - drafts are being created / updated in the draft table and upon saving the content is properly moved to a persistent table. I've also implemented a custom logic to validate the semantic key and it also works fine.

My only concern is that when I hit the "Create" button and immediately leave the processing, the RAP is generating an empty entry in the draft table. This entry does not have any data except a couple of standard fields e.g. created_at, created_by, local_last_changed etc.

So my question is: is it possible to implement any logic that would prevent creation of drafts if they have no data ? 

Regards,

Bohdan

View Entire Topic
junwu
Active Contributor
0 Kudos
Bohdan
Active Contributor
0 Kudos

Hi @junwu ,

Thank you for this suggestion ! This option definitely looks interesting and to be honest, I was not aware of it till now 🙂 But after the review and careful analysis, it seems to me that it will not suit my requirement. This option allows to automate a new instance of the BO with some default values. But my requirement is how to avoid creating a draft, when the user did not fill any values in the UI at all. To sum up: I do not want to fill any pre-defined / default values for a BO during creation and I do not even want to save the draft if the user did not fill at least one field in UI.

Regards,

Bohdan

junwu
Active Contributor
0 Kudos
i think you can use action for your case.