{"ref":"content:how-to-share-tables-across-different-cap-projects","page":"/content/how-to-share-tables-across-different-cap-projects","json":"/content/how-to-share-tables-across-different-cap-projects.json","generated":"2026-10-26","drafted_with_ai":true,"entity":{"id":"how-to-share-tables-across-different-cap-projects","title":"How to share tables across different CAP projects","url":"https://community.sap.com/t5/technology-blog-posts-by-members/how-to-share-tables-across-different-cap-projects/ba-p/13497184","content_type":"blog","explains":["artifact:miyasuta-cap-cross-container","capability:hana-native-artifacts"],"summary":"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.","short":"Four scenarios for sharing tables across CAP projects","authors":["actor:mio-yasutake"],"published":"2021-10-03","sources":[{"url":"https://community.sap.com/t5/technology-blog-posts-by-members/how-to-share-tables-across-different-cap-projects/ba-p/13497184","title":"How to share tables across different CAP projects — SAP Community","checked":"2026-09-07","quote":"Keep in mind that these scenarios are purely for learning purpose. There are cases where consuming OData service is more appropriate than accessing database directly."}],"provenance":{"discovered_via":[{"source":"source:github","channel":"miyasuta"},{"source":"source:sap-community"}],"first_seen":"2026-09-07"},"drafted_with_ai":true,"published_on":"source:sap-community"},"readings":{"liveness":[{"label":"Checked against the source","tier":"unknown","evidence":"nobody has checked it"},{"label":"Source reachable","tier":"unknown","evidence":"not crawled"},{"label":"Age","tier":"poor","evidence":"published 60 months ago"}],"compatibility":[{"label":"Version","tier":"unknown","evidence":"no version declared"},{"label":"Moved since?","tier":"good","evidence":"no recorded change after 2021-10-03"},{"label":"Findings","tier":"good","evidence":"none flagged"}],"reach":[{"value":33459,"unit":"views"},{"value":71,"unit":"comments"},{"value":35,"unit":"likes"}]},"signals":{"views":33459,"likes":35,"comments":71,"metrics_at":"2026-10-25"},"series":null,"edges":{"authors":[{"ref":"actor:mio-yasutake","name":"Mio Yasutake","json":"/actors/mio-yasutake.json"}]}}