user3783327
user3783327

Reputation: 626

Is there a way to access SAP CAP schema entity without defining it in the service?

I am searching for a way to access a SAP CAP entity defined in schema inside JavaScript (NodeJS) implementation of the service without defining the entity in the service definition. Is it possible?

The entity I wan't to use is just a helper view.

In my service implementation I use entities defined in the service.cds file like this:

    const {
        EntityA, EntityB, EntityC, SomeInternalEntity
    } = this.entities;

Currently SomeInternalEntity is defined in the service.cds file and therefore also exposed as OData Service.

Can it be just defined in the schema.cds and used in the service implementation the same way? Or is there a way to hide the SomeInternalEntity from the OData service itself?

Upvotes: 0

Views: 140

Answers (0)

Related Questions