How to share tables across different CAP projects
Four scenarios for reading one CAP project's table from another, worked out as a matrix of what each one needs: the same HDI container and namespace, the same container under a different namespace, a different container, and a different Cloud Foundry space. The mechanics change with each step — @cds.persistence.exists on the reused entity throughout, an .hdbsynonym once namespaces diverge, .hdbrole and .hdbgrants once containers do, and a user-provided service built from the grantor's credentials once spaces do. The author flags the caveat themselves: these are learning scenarios, and consuming the OData service is often the better answer than reaching into another project's database. Dated corrections from twelve days after publication sit inline — synonyms need only the name because the configuration comes from .hdbsynonymconfig, SERVICE_REPLACEMENTS in mta.yaml removes the hard-coded service name, and the reused container need not be bound to the srv module.
Where it sits
Who is behind it
In the atlas: maintains 47, contributes to 47, wrote 10@miyasutaauthor
Properties
About this work
What was found on the page
Details
Graph
Source
History
- Entered the atlasDiscovered via GitHub API · miyasuta, SAP Community.
For your agent
- Ref
content:how-to-share-tables-across-different-cap-projects- JSON
- /content/how-to-share-tables-across-different-cap-projects.json
- MCP
- Connecting an agent