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

View Entire Topic
Margit_Wagner
Product and Topic Expert
Product and Topic Expert

Hi cup_noodles 
this is a tough question!
The SAP BTP Learning group helps you to develop the knowledge and skills you need to become an expert for SAP Business Technology Platform (BTP). Here you can ask questions and collaborate with other learners to reach your learning goals and to prepare for your SAP Certification exams,  and while the topic you addressed  isn't specifically covered here  and since it can hardly be answered without in-depth implementation knowledge, I can point you to several excellent resources to help find an answer to your question.

I recommend to add your inquiry to Jana Subramanian's blog. 
or to post your  question to a our SAP Community https://sap.com/community.html where you can directly exchange with experienced experts with project Background -  SAP Community is a public space where anyone can start discussions and questions are answered by anyone.

SAP Community enables professionals across the globe to connect, exchange information, engage, and receive recognition for your achievements. This inclusive and receptive environment welcomes all individuals who want to seek help and share knowledge about SAP software and solutions.

If you need help, and your issue is specific to the standard functionality of your SAP solution, contact SAP Product Support using the channel listed below which best suits your business impact

Please check https://support.sap.com/en/my-support/product-support.html#section_519294480

Please always feel free to come back to our SAP BTP Learning group to ask your questions and collaborate with other learners to reach your learning goals and to prepare for your SAP Certification exams. However, for your particular question, I'd recommend the resources above.

I hope this helps, and best of luck!
Margit