cancel
Showing results for 
Search instead for 
Did you mean: 

PresentationVariants on Object Page Table

0 Kudos
547

Hello Experts,

In my odata v4 Fiori Elements project I would like to switch the PresentationVariant (or really just the SortOrder) of an annotated Table during runtime. This is available for SelectionVariants as described here, and for tables in multiple view mode using a SelectionPresentationVariant as described here. Is it possible to achieve similar functionality using only the PresentationVariant?

Best regards,

Jibbril

Accepted Solutions (0)

Answers (1)

Answers (1)

Hubert
Product and Topic Expert
Product and Topic Expert

Here is the answer that you are looking for

https://github.com/SAP-samples/abap-platform-fiori-feature-showcase/blob/main/06_object_page_content...

child entity:

@UI.presentationVariant: [
  {
    qualifier: 'pVariant',
    maxItems: 5,
    sortOrder: [
      {
        by: 'StringProperty',
        direction: #DESC
      }
    ],
    visualizations: [{type: #AS_LINEITEM}]
  }
]

parent entity:

// Search Term #OPTable, #PresentationVariant-Child
@UI.facet: [
  {
    purpose: #STANDARD,
    type: #PRESENTATIONVARIANT_REFERENCE,
    targetElement: '_Child',
    targetQualifier: 'pVariant',
    label: 'Child Entity (1..n)(#OPTable)',
    id: 'childEntitiesSection'
  }
]