cancel
Showing results for 
Search instead for 
Did you mean: 

SAP ABAP RAP - Fiori Elements - Quickview card on a editable field

Ramjee_korada
Active Contributor
0 Kudos

Hello Experts,

I am building a fiori app using Fiori Elements and RAP CDS views.

When I implemented quickview / contact card for a field, It works fine in list report page and object page in Display mode.

But it remains same in EDIT mode of the object page and it does not let user to change the input.

Please advise.

Best wishes,

Ramjee Korada

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Ramjee,

I checked this, there have probably been no to very few requests for this so far, thats why this is not implemented for edit mode. The suggestion would be to add an additional "normal" DataField to maintain the "Name" in edit mode, similar to e.g. the "Supplier Name" below. In @UI: { fieldGroup...} you can use "hidden" with a path to only show the contact in display mode and the normal data field in edit mode:
@UI: { fieldGroup: [{ ..., hidden: #(PathToAPropertyWhichIsTrueInEditCase), ...}] }

Hope this helps!

Best regards,
Stefan

Ramjee_korada
Active Contributor
0 Kudos

Hello Stefan,

Thank you for the answer. I was also thinking in this direction already. But unfortunately I cant determine whether user is in Edit or Display mode to fill the virtual element "hidden: #(PathToAPropertyWhichIsTrueInEditCase)" in ABAP CDS.

I think some manipulation needed on UI based on application state ( Edit / Display ).

Best wishes,

Ramjee Korada

Answers (1)

Answers (1)

JessieCheah
Product and Topic Expert
Product and Topic Expert

Hi Ramjee,

from the screenshot it looks like you have a draft BO. To add on to Stefan's answer, perhaps you can determine that it is in edit mode using the field 'IsActiveEntity'. When it is in edit mode, the value would be 'false'. Your annotation can look like this:

// Search Term #HidingContent
@UI.facet: [{
  purpose: #HEADER, // or #STANDARD
  type: #FIELDGROUP_REFERENCE,
  label: 'Section Visible when in Edit(#HidingContent)',
  targetQualifier: 'ShowWhenInEdit',
  hidden: #( IsActiveEntity )
}]

Code snippet taken from here: https://github.com/SAP-samples/abap-platform-fiori-feature-showcase/wiki/Feature-Showcase-App-Guide#...

Regards,

Jessie

Ramjeekorada
Discoverer
0 Kudos

Hi Jes,

Thank you for the update.

It works to hide the field in Display mode and show in Edit mode using hidden: #( IsActiveEntity ).

How to do the same in other way ( show the field in Display mode and hide in Edit mode )? Do we have different flags ?

i.e. A flag opposite to IsActiveEntity ?

Example :

Hide the field in Display mode and show in Edit mode => Actual input field

Show the field in Display mode and hide in Edit mode => Derived/shadow/Quick view field for above input.

Best wishes,

Ramjee Korada.

JessieCheah
Product and Topic Expert
Product and Topic Expert
0 Kudos

I had to search for it myself but there is another field called 'HasActiveEntity'

So it you want the input field to be hidden during Display and visible during Edit, then use hidden: #( isActiveEntity ). The other field would be visible during Display and hidden during Edit with hidden: #( hasActiveEntity )

Do let me know if this works!