cancel
Showing results for 
Search instead for 
Did you mean: 

annotations.cds error: path should lead to type Edm.PrimitiveType.CDS

damovand
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello, 

I get the error Path title leads to element. The path should lead to type Edm.PrimitiveType.CDS (annotations) . It happens 9 times for every  $Type : and value pair.

The strange thing is even with the error I still see Fiori preview rendering Risks correctly.  However, Mitigations and BusinessPartners do not show anything on Fiori preview.

The following is my annotations.cds which is copied from the course content.

// using RiskService as service from '../../srv/risk-service';
using RiskService from '../../srv/risk-service';
 // Risk List Report Page
 annotate RiskService.Risks with @(UI : {
    HeaderInfo : {
       TypeName : 'Risk',
       TypeNamePlural : 'Risks',
       Title : {
          $Type : 'UI.DataField',
          Value : title,
       },
       Description : {
          $Type : 'UI.DataField',
            Value : descr,
       }
    },
    SelectionFields : [prio],
    Identification : [{Value : title}],
    // Define the table columns
    LineItem : [
       {Value : title},
       {Value : miti_ID},
       {Value : owner},
       {Value : bp_BusinessPartner},
       {
          Value : prio,
          Criticality : criticality
       },
       {
          Value : impact,
          Criticality : criticality
       },
    ],
 });
 // Risk Object Page
 annotate RiskService.Risks with @(UI : {
     Facets : [{
        $Type : 'UI.ReferenceFacet',
        Label : 'Main',
        Target : '@UI.FieldGroup#Main',
     }],
     FieldGroup #Main : {Data : [
       {Value : miti_ID},
       {Value : owner},
       {Value : bp_BusinessPartner},
       {
           Value : prio,
           Criticality : criticality
       },
       {
           Value : impact,
           Criticality : criticality
       }
    ]},
 });

 

Margit_Wagner
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi @damovand,

Thank you for bringing this to our attention.

To help us to understand your query better, could you please provide the following information?

  • Title or URL of the SAP Learning Journey and the exercise (title/number)
  • Steps to reproduce / refer to the appropriate steps in the exercise

Thank you

Margit

Accepted Solutions (0)

Answers (0)