cancel
Showing results for 
Search instead for 
Did you mean: 

RAP Draft enabled with additional fields in CDS layer

ADR
Participant
0 Kudos

Hi,

I am using RAP based application with draft enabled. I have few additional derived fields at CDS layer which are displayed on the object page of Fiori Element.

For example, I have F1 and F2 at the table level. At the CDS level based on the values of F1 and F2, I have derived C3. C3 is displayed on the object page along with F1 and F2.

Now, when the data is active, the value of C3 is derived correctly. But for draft mode it is not. Any idea how to populate the C3 value at draft mode?

From my CAPM experience, we could do it easily using custom handler for READ event on draft entity. Is there any similar option available in RAP?

Thanks, Anupam

View Entire Topic
Ramjee_korada
Active Contributor
0 Kudos

Hi Anupam,

I see below options:

  1. If it is to take over the value from Active instance into Draft instance during draft creation, then add this field also on the interface view instead of projection view.
  2. If some logic to be executed, then go through blog post - ABAP RAP : Customizing Draft Behavior in a Fiori Application

Best wishes,

Ramjee Korada

ADR
Participant
0 Kudos

Hi ramjee.korada ,

Thanks for your reply. Let me clarify the requirement.

Let's consider a simple table ID, Name and City.

In the interface view, a logic is there to set a flag if City is entered 'ABC'

Now, if we create an entry using RAP, when the entry is saved as active the CityFlag value is displayed on screen. But when we are at draft mode, the CityFlag remains blank.

In the following example ID=1 is an active entry. The CityFlag is diplayed. But ID=2 is still in draft mode and CityFlag is not displayed

Is there any way, to display the city flag for draft as well?

Regards,

Anupam