{"ref":"content:btp-cap-custom-plugin-to-separate-generic-change-log-capture-logic","page":"/content/btp-cap-custom-plugin-to-separate-generic-change-log-capture-logic","json":"/content/btp-cap-custom-plugin-to-separate-generic-change-log-capture-logic.json","generated":"2026-10-26","drafted_with_ai":true,"entity":{"id":"btp-cap-custom-plugin-to-separate-generic-change-log-capture-logic","title":"BTP CAP : Custom plugin to separate generic change log capture logic","url":"https://community.sap.com/t5/technology-blog-posts-by-members/btp-cap-custom-plugin-to-separate-generic-change-log-capture-logic/ba-p/13551518","content_type":"blog","published_on":"source:sap-community","explains":[{"ref":"capability:change-tracking","applies_to":{"ecosystems":["cap"]}},"capability:plugin-authoring"],"summary":"Walks through building a custom [CAP](ecosystem:cap) plugin that centralises change-log capture: on `cds.once('served')` it collects entities annotated `@audit`, then hooks `srv.before('UPDATE')` to read the existing record, diff it field by field against the incoming payload, and record old/new values with the user and timestamp. It also documents a `cds build` failure packaging the plugin's own directory into `gen/srv` for MTA deployment, fixed by adding it as a `copyfiles` build-parameter step in `mta.yaml`.","short":"CAP plugin centralising change-log capture for @audit entities","author":"sreehari_vpillai","published":"2023-05-10","provenance":{"discovered_via":[{"source":"source:sap-community","channel":"cap-tag"}],"first_seen":"2026-09-23"},"drafted_with_ai":true,"history":[{"date":"2026-10-17","field":"explains","from":null,"to":"applies_to on capability:change-tracking (cap)","reason":"Door scope proposed from the title and summary, so a door page lists the piece only where it holds (docs/concepts/content-on-doors.md)."}]},"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 41 months ago"}],"compatibility":[{"label":"Version","tier":"unknown","evidence":"no version declared"},{"label":"Moved since?","tier":"good","evidence":"no recorded change after 2023-05-10"},{"label":"Findings","tier":"good","evidence":"none flagged"}],"reach":[{"value":3938,"unit":"views"},{"value":9,"unit":"comments"},{"value":5,"unit":"likes"}]},"signals":{"views":3938,"likes":5,"comments":9,"metrics_at":"2026-10-25"},"series":null,"edges":{"authors":[]}}