Skip to Content
Technical Articles
Author's profile photo Md Sanullah

Enable Draft state in Fiori Application based on RAP Model

In this blog, I will explain you how to enable draft state in  managed scenario using   RAP Model.

I have created Fiori application based on RAP Model for managed scenario.

Click on Create button to  create new Record. Framework will allow to create new Records.

We can see draft functionality is not enabled in create mode. we will get draft icon adjacent to Create button in Draft state. Please refer last screen shot to look and feel the difference.

To enable Draft state we need to do some modification in Behavior Definition corresponding to consumption view .

We need to add one line of code: use draft; in behavior  definition of consumption view.

Major changes we need to do in Behavior  Definition of interface view. We need to add code at line no 2,10 and 11 and 13 to enable the draft state.


Create draft table zdr_empdetails  at line 10 in above screen shot by selecting draft table name and hit CTRl+1 key . We can observe %admin property is added by itself in draft table.

Draft table will be created similar to table on which we perform CRUD operation except “%admin” field.

We have done with the changes to enable draft state. Refresh the Fiori app and click on Create button as mentioned in 1st step.

Click on back icon to navigate to main page. It will display popup message. Select keep draft to hold the input value.

On Main page we can see record with draft state is saved.

 Finally we have implemented Draft state using RAP for managed scenario :).

learning and sharing is way to keep updated :).

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.