cancel
Showing results for 
Search instead for 
Did you mean: 

Implement Quick View in ABAP CDS

JaimeRodriguez
Participant
133

Hi everyone!

I'm trying to implement a Quick View for a data reference as described in Fiori Feature Showcase example.

So, I created the CDS with UI.facet for QUICK_VIEW:

@Consumption.semanticObject: 'Practitioner'

define root view entity /RHP/I_Practitioner
  as select from /RHP/R_PractitionerTP

{

@UI.facet: [ { type: #FIELDGROUP_REFERENCE,
                      label: 'Pracitioner'
                      targetQualifier: 'QuickViewCard',
                      purpose: #QUICK_VIEW } ]

@ObjectModel.text.element: [ 'FullName' ]
key PractitionerUUID,

@UI.fieldGroup [ { qualifier: 'QuickViewCard', position: 10 } ]
FullName,

@UI.fieldGroup: [ { qualifier: 'QuickViewCard', position: 40 } ]
_PractitionerRoleStandard.IsDoctor,

@UI.fieldGroup: [ { qualifier: 'QuickViewCard', position: 50 } ]
_PractitionerRoleStandard.IsNurse,

@UI.fieldGroup: [ { qualifier: 'QuickViewCard', position: 60 } ]
_PractitionerRoleStandard.IsPharmacist

}

In the projection view I created the association as foreign key

define view entity /RHP/C_PatientPractitionerTP
  as projection on /RHP/R_PatientPractitionerTP
  association of one to one /RHP/I_Practitioner as _Practitioner on $projection.PractitionerUUID = _Practitioner.PractitionerUUID
{

  key UUID,

      PatientUUID,

      @Consumption.semanticObject: 'Practitioner'

      @Consumption.valueHelpDefinition: [ { entity:            { name:    '/RHP/C_PractitionerVH',
                                                                 element: 'PractitionerUUID' },
                                            additionalBinding: [ { localConstant: 'X',
                                                                   element:       'IsDoctor',
                                                                   usage:         #FILTER } ] } ]
      @ObjectModel.foreignKey.association: '_Practitioner'
      PractitionerUUID,

      CreatedBy,

      CreatedAt,

      LastChangedBy,

      LastChangedAt,

      EtagMaster,

      /* Associations */
      _Patient : redirected to parent /RHP/C_PatientTP,
      _Practitioner

}

In the application, the link is enabled but the quick view shows as "No details available"

JaimeRodriguez_0-1739811496091.png

Any clue of what I forgot?

Thanks in advance.

Accepted Solutions (0)

Answers (0)