Skip to Content
1
Jan 07, 2020 at 02:46 PM

Adding a Field Group to a Fiori Elements Object page

4476 Views Last edit Jan 07, 2020 at 03:14 PM 2 rev

Hello everyone, I am working on a Fiori Elements application which should have a list report page with sales orders and corresponding object pages for each sales order with their items.

This works, but I'm trying to add a field group to the object page, as shown here. I cannot make it happen to create the field groups or display any of them. I copied the exact code, so it seems as if the error is not in the code itself..?

I'm using Eclipse with ADT to create the cds views and metadata extensions, SAP Web IDE to create a template app, and Fiori 1809. The service is activated in the maint_services transaction. The annotation file is then successfully transferred from the backend to the front end and loaded within the app, as things like @UI.lineItem: [{ position: 20 }] work perfectly.

I used

   @UI.facet: [{
               label : 'General Information',
               id : 'GeneralInfo',
               purpose: #STANDARD,
               type : #COLLECTION,
               position: 10
           },
           {
               label: 'Basic Data',
               id : 'BasicData',
               purpose: #STANDARD,
               parentId : 'GeneralInfo',
               type : #FIELDGROUP_REFERENCE,
               targetQualifier : 'BasicData',
               position: 20
           }]

and

@UI.fieldGroup: [{ position: 20, qualifier: 'BasicData' }]
    PSPElement;

both inside of my metadata extension. Is this the correct approach? (Adding both to the cds view changed nothing..)

I feel like there is something basic I am missing, but I could not figure it out yet. Apart from basic annotations like lineitem and selectionfield, no other annotation worked, so the problem might not be exclusive to field groups.

Thanks for your help :)