{"ref":"capability:feature-toggles","page":"/capabilities/feature-toggles","json":"/capabilities/feature-toggles.json","generated":"2026-10-26","drafted_with_ai":true,"entity":{"id":"feature-toggles","name":"Feature toggles","domain":"operations-and-runtime","ecosystems":["cap","btp","abap"],"universal":true,"description":"Turning behaviour on and off per tenant or per user at runtime, without redeploying, and knowing which toggles are live. System-level switches for delivered objects and runtime flags for unfinished features share the name.","short":"Turning behaviour on and off per tenant or user at runtime","core_coverage":{"state":"core-and-community","assessed_at":"2026-09-27","relationship":"narrow-by-design","what_core_does":"Built in: a feature is a subfolder of `fts/` holding CDS files that extend the base model with fields, entities and Fiori annotations, activated dynamically per tenant, user or request. In Node.js it is switched on with `cds.requires.toggles: true` on top of [@sap/cds-mtxs](artifact:sap-cds-mtxs), and the mocked authentication assigns features to test users; in CAP Java the active set is computed per request by a Feature Toggles Info Provider registered as a Spring bean.","where_it_stops":"At the decision. The guide says to bring your own toggle provider for production, because user and tenant management is outside CAP; a feature's CDS files may not sit in subfolders and may not depend on another feature. Which tenant gets which feature, and switching one at runtime without a redeploy, is what the entries here add.","community_adds":"[@cap-js-community/feature-toggle-library](artifact:cap-js-community-feature-toggle-library) is a toggle provider for production: live-updatable toggles backed by Redis.","sources":[{"url":"https://cap.cloud.sap/docs/guides/extensibility/feature-toggles","title":"Feature Toggles — capire","checked":"2026-09-27","quote":"CAP feature-toggled aspects allow SaaS providers to create pre-built features as CDS models, extending the base models with new fields, entities, as well as annotations for SAP Fiori UIs."},{"url":"https://cap.cloud.sap/docs/guides/extensibility/feature-toggles","title":"Feature Toggles — capire","checked":"2026-09-27","quote":"Switch on feature toggle support by adding cds.requires.toggles: true."},{"url":"https://cap.cloud.sap/docs/guides/extensibility/feature-toggles","title":"Feature Toggles — capire","checked":"2026-09-27","quote":"Add a subfolder per feature to folder fts and put .cds files into it."},{"url":"https://cap.cloud.sap/docs/guides/extensibility/feature-toggles","title":"Feature Toggles — capire","checked":"2026-09-27","quote":"In principle, features can be toggled per request, per user, or per tenant"},{"url":"https://cap.cloud.sap/docs/guides/extensibility/feature-toggles","title":"Feature Toggles — capire","checked":"2026-09-27","quote":"Bring your own toggle provider for production"},{"url":"https://cap.cloud.sap/docs/guides/extensibility/feature-toggles","title":"Feature Toggles — capire","checked":"2026-09-27","quote":"For productive use in CAP Java, the mock user configuration must not be used. The set of active features is determined per request by the Feature Toggles Info Provider."},{"url":"https://cap.cloud.sap/docs/guides/extensibility/feature-toggles","title":"Feature Toggles — capire","checked":"2026-09-27","quote":"no using dependencies between features, any entity, service or type that you refer to or extend needs to be part of the base model"}]},"coverage_by_ecosystem":{"btp":{"state":"core-only","assessed_at":"2026-09-09","what_core_does":"The Feature Flags service holds boolean and string flags, toggled in a dashboard and read by an application over a binding with a client-side cache.","sources":[{"url":"https://github.com/SAP-samples/btp-service-metadata/blob/main/v1/developer/feature-flags.json","title":"SAP Feature Flags service — SAP btp-service-metadata v1","checked":"2026-09-09"}]},"abap":{"state":"core-and-community","assessed_at":"2026-09-14","what_core_does":"The Switch Framework controls through switches whether repository objects and enhancements are visible; a business function groups switches and is switched on for the whole system.","where_it_stops":"At the system. A business function is on for every user of the system and only a reversible one can be switched off, so a flag a developer checks in code to ship an unfinished feature switched off is what the ABAP libraries add.","sources":[{"url":"https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenswitch_framework_glosry.htm","title":"ABAP Keyword Documentation — Switch Framework (glossary)","checked":"2026-09-14","quote":"Framework for the external control of the visibility of repository objects, their components, or enhancements using switches."},{"url":"https://help.sap.com/doc/saphelp_gbt10/1.0/en-US/42/f26671070d3ee4e10000000a1553f7/content.htm?no_cache=true","title":"SAP Help — Business Function (Switch Framework)","checked":"2026-09-14","quote":"Business functions are switched on at a system level."}],"relationship":"unassessed"}},"history":[{"date":"2026-09-14","field":"ecosystems","from":"cap, btp","to":"cap, btp, abap","reason":"Widened to ABAP: btc-ag/Featuretoggle and raketenstart-abap/abap-feature-toggle turn features in ABAP code on and off at runtime, each with a screen to switch them."},{"date":"2026-09-27","field":"core_coverage.state","from":"community-only","to":"core-and-community","reason":"capire audit 2026-09-27: the Feature Toggles guide documents toggled features as built into both runtimes, with the production toggle provider left to the project, which is exactly what the one community option supplies. The capability had no core paragraph and no source."}],"framing_by_ecosystem":{"abap":{"description":"In ABAP a toggle is either SAP's switch, which decides at system level whether delivered objects are active, or a flag a program reads at runtime so an unfinished feature can reach production switched off."}},"drafted_with_ai":true},"sap_delivery":{"door":"cap","all":{"built_in":[{"ref":"artifact:cap-java-cds-services-bom","name":"com.sap.cds:cds-services-bom","json":"/artifacts/cap-java-cds-services-bom.json"}],"documented_pattern":[],"announced":[],"packages":[{"ref":"artifact:sap-cds-mtxs","name":"@sap/cds-mtxs","json":"/artifacts/sap-cds-mtxs.json"}]},"by_flavor":{"node":{"built_in":[],"documented_pattern":[],"announced":[],"packages":[{"ref":"artifact:sap-cds-mtxs","name":"@sap/cds-mtxs","json":"/artifacts/sap-cds-mtxs.json"}]},"java":{"built_in":[{"ref":"artifact:cap-java-cds-services-bom","name":"com.sap.cds:cds-services-bom","json":"/artifacts/cap-java-cds-services-bom.json"}],"documented_pattern":[],"announced":[],"packages":[]}}},"edges":{"use_cases":[],"shared_tasks":[],"related_tasks":[],"options":[{"ref":"artifact:cap-js-community-feature-toggle-library","name":"@cap-js-community/feature-toggle-library","json":"/artifacts/cap-js-community-feature-toggle-library.json","ecosystem":"cap","origin_ring":"community-org"},{"ref":"artifact:sap-cds-mtxs","name":"@sap/cds-mtxs","json":"/artifacts/sap-cds-mtxs.json","ecosystem":"cap","origin_ring":"sap-official"},{"ref":"artifact:raketenstart-abap-abap-feature-toggle","name":"abap-feature-toggle","json":"/artifacts/raketenstart-abap-abap-feature-toggle.json","ecosystem":"abap","origin_ring":"independent"},{"ref":"artifact:soontao-cds-feature-toggle","name":"cds-feature-toggle","json":"/artifacts/soontao-cds-feature-toggle.json","ecosystem":"cap","origin_ring":"independent"},{"ref":"artifact:cap-java-cds-services-bom","name":"com.sap.cds:cds-services-bom","json":"/artifacts/cap-java-cds-services-bom.json","ecosystem":"cap","origin_ring":"sap-official"},{"ref":"artifact:btc-ag-featuretoggle","name":"Featuretoggle","json":"/artifacts/btc-ag-featuretoggle.json","ecosystem":"abap","origin_ring":"independent"},{"ref":"artifact:btp-feature-flags","name":"SAP Feature Flags service","json":"/artifacts/btp-feature-flags.json","ecosystem":"btp","origin_ring":"sap-official"}],"samples":[{"ref":"artifact:sap-samples-cloud-cf-feature-flags-sample","name":"SAP-samples/cloud-cf-feature-flags-sample","json":"/artifacts/sap-samples-cloud-cf-feature-flags-sample.json"}],"explained_by":[{"ref":"content:streamline-user-targeting-with-segments-in-sap-feature-flags","name":"Streamline User Targeting with Segments in SAP Feature Flags","json":"/content/streamline-user-targeting-with-segments-in-sap-feature-flags.json"},{"ref":"content:open-sourcing-cap-how-to-learn-more-or-get-involved","name":"Open Sourcing CAP – how to learn more or get involved","json":"/content/open-sourcing-cap-how-to-learn-more-or-get-involved.json"}],"normative_context":[]}}