cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Path does not exist error while creating Annotation @UI.LineItem in CAP Model

former_member540653
Discoverer
0 Likes
9,018

Hello Team,

I have created CAP project and getting Path does not exist error while creating Facet using Annotation @UI.LineItem. I have created Association and trying to access it in Facet using @UI.LineItem. I have attached data-model.cds,cat-service.cds and fioriAnnotation.cds file.

Kindly Suggest.

Accepted Solutions (0)

Answers (2)

Answers (2)

maryana_naboka
Product and Topic Expert
Product and Topic Expert
0 Likes

The error "path does not exist" indicates that the annotation or property referenced in the annotation does not exist. In this case, there is no LineItem annotations applied to the entities representing OrderLog and Cleaning. When you annotate these entities with UI.LineItem annotation, the error will disappear.

You can use the code completion (Ctrl+Space or CMD+Space) to apply annotations on the entities either inline or with the annotate directive. For more details, see https://cap.cloud.sap/docs/advanced/fiori#fiori-annotations

maryana_naboka
Product and Topic Expert
Product and Topic Expert
0 Likes

You can also try to remove the highlighted value and use the code completion (CTRL+Space) to see what values are available. Maybe the @UI.LineItem annotation you are trying to reference is not defined, or the path to it contains the spelling error, or it is defined in the file that is not referenced with the using statement... Code completion gives you an overview on what annotations are available at which entities. With CTRL+Space you get the list of annotations on the current entity to select from as well as different enties to explore. If you selected the different entity, add / and select one of the annotations available on that entity. If you think the annotation is defined on that entity but you do not see it in the code completion, the using directive might be missing or it's a bug on our side. In any case. please do not hesitate to log an issue with your project, we will have a look