{"status":"success","message":"","http_code":200,"data":{"type":"message","id":"14391123","href":"/messages/14391123","view_href":"https://community.sap.com/t5/technology-blog-posts-by-sap/new-and-improved-change-tracking-plugin/ba-p/14391123","author":{"type":"user","id":"9300","href":"/users/9300","view_href":"https://community.sap.com/t5/user/viewprofilepage/user-id/9300","login":"rupamaity"},"subject":"New and improved: Change Tracking plugin","body":"<P><SPAN>Enterprise applications need to maintain the integrity and traceability of data. Change tracking maintains a detailed change history by recording every insertion, update, and deletion, including the user and timestamp for each modification. This is important for root cause analyses, detecting unauthorized changes, and accountability.</SPAN></P><P><SPAN>In the April release notes of SAP Cloud Application Programming (CAP), we hinted at the revamped Change Tracking plugin (that was then in Beta), which greatly simplifies these tasks. </SPAN></P><P>Version 2.0 of <EM>@cap-js/change-tracking</EM> is now generally available</P><P><STRONG><SPAN>Why 2.0?</SPAN></STRONG><SPAN> &nbsp;That is because the Change Tracking plugin already existed but was plagued by many issues. In Change Tracking 2.0, we have learnt from all the brickbats that have come our way and completely overhauled the plugin.</SPAN></P><P><SPAN>Important improvements include:</SPAN></P><OL><LI><SPAN>Significant performance improvements</SPAN></LI><LI><SPAN>Tree table visualization </SPAN></LI><LI><SPAN>Support for CXL</SPAN></LI></OL><P><STRONG><SPAN>Significant performance improvements</SPAN></STRONG></P><P><SPAN>Version 2.0 of <A href=\"https://github.com/cap-js/change-tracking\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">@cap-js/change-tracking</A> introduces a fundamentally new architecture for tracking changes. Instead of capturing changes at the service level, which caused various issues like slow inserts and updates or missed updates for parent and child entities, the plugin now tracks changes at the database level using native database triggers.</SPAN></P><P><SPAN>Staying true to the principle of <A href=\"https://cap.cloud.sap/docs/guides/domain/#capture-intent-%E2%80%94-what-not-how\" target=\"_blank\" rel=\"noopener nofollow noreferrer\"><EM>What, not How!</EM></A>, the plugin automatically generates native database triggers on SQLite (for local development), SAP HANA or PostgreSQL for entities while still using the original @changelog annotation.</SPAN></P><pre class=\"lia-code-sample language-json\"><code>annotate Books with @changelog: (title || ' (' || author.name || ')') {\n\n  title @changelog;\n\n  price @changelog;\n\n}</code></pre><P>&nbsp;</P><P><SPAN>This approach delivers significant performance improvements and resolves long-standing issues with bulk operations, sorting, and change log consistency.</SPAN></P><P><STRONG><SPAN>Tree table visualization</SPAN></STRONG></P><P><SPAN>The new plugin version also introduces a new tree table visualization for a hierarchical view of changes across parent and child entities. The depth of displayed child changes can be configured, but is set at 3 by default. </SPAN></P><P><SPAN>This feature allows business users to </SPAN>trace modifications through the entire entity relationship tree in a single interface, rather than inspecting individual records level-by-level.</P><P><span class=\"lia-inline-image-display-wrapper lia-image-align-center\" image-alt=\"rupamaity_0-1781259558799.png\" style=\"width: 999px;\"><img src=\"https://community.sap.com/t5/image/serverpage/image-id/421114i8DE6119BFA432AF6/image-size/large?v=v2&amp;px=999\" role=\"button\" title=\"rupamaity_0-1781259558799.png\" alt=\"rupamaity_0-1781259558799.png\" /></span></P><P><STRONG><SPAN>Support for CXL</SPAN></STRONG></P><P><SPAN>The @changelog annotation has been enhanced to support CDS Expression Language (CXL). Alongside the existing path expression, this allows developers to leverage </SPAN>CXL's capabilities to have more control on the customization of object IDs and label generation.&nbsp;</P><pre class=\"lia-code-sample language-javascript\"><code>annotate Incidents {\n  status @changelog: (status.code || ': ' || status.descr);\n  price  @changelog: (price &lt; 100 ? 'Budget' : 'Premium');\n}</code></pre><P><SPAN>And these are just a few! You can read about all the improvements <A href=\"https://cap.cloud.sap/docs/releases/2026/apr26#change-tracking-v2\" target=\"_self\" rel=\"nofollow noopener noreferrer\">here</A></SPAN></P><P><SPAN>We look forward to you trying this new plugin out and as always, eager to hear your feedback. </SPAN></P><P><SPAN>You can find the plugin <A href=\"https://github.com/cap-js/change-tracking\" target=\"_self\" rel=\"nofollow noopener noreferrer\">here</A></SPAN></P><P><SPAN>&nbsp;</SPAN><SPAN>Till then, happy coding!</SPAN></P>","teaser":"","board":{"type":"board","id":"technology-blog-sap","href":"/boards/technology-blog-sap","view_href":"https://community.sap.com/t5/technology-blog-posts-by-sap/bg-p/technology-blog-sap"},"conversation":{"type":"conversation","id":"14391123","href":"/conversations/14391123","view_href":"https://community.sap.com/t5/technology-blog-posts-by-sap/new-and-improved-change-tracking-plugin/ba-p/14391123","style":"blog","thread_style":"blog","messages_count":1,"solved":false,"last_post_time":"2026-06-12T12:19:54.447+02:00","last_post_time_friendly":"2026 Jun 12"},"topic":{"type":"message","id":"14391123","href":"/messages/14391123","view_href":"https://community.sap.com/t5/technology-blog-posts-by-sap/new-and-improved-change-tracking-plugin/ba-p/14391123"},"post_time":"2026-06-12T12:19:54.447+02:00","post_time_friendly":"2026 Jun 12","depth":0,"read_only":false,"edit_frozen":false,"language":"EN","can_accept_solution":false,"placeholder":false,"is_solution":false,"solution_data":{},"metrics":{"type":"message_metrics","views":1175},"current_revision":{"type":"revision","id":"14391123_9","last_edit_author":{"type":"user","id":"9300","href":"/users/9300","view_href":"https://community.sap.com/t5/user/viewprofilepage/user-id/9300","login":"rupamaity"},"last_edit_time":"2026-06-12T13:06:03.360+02:00"},"kudos":{"query":"SELECT * FROM kudos WHERE message.id = '14391123'"},"tags":{"query":"SELECT * FROM tags WHERE messages.id = '14391123'"},"labels":{"query":"SELECT * FROM labels WHERE messages.id = '14391123'"},"images":{"query":"SELECT * FROM images WHERE messages.id = '14391123'"},"videos":{"query":"SELECT * FROM videos WHERE messages.id = '14391123'"},"attachments":{"query":"SELECT * FROM attachments WHERE message.id = '14391123'"},"replies":{"query":"SELECT * FROM messages WHERE parent.id = '14391123'"},"ratings":{"query":"SELECT * FROM ratings WHERE message.id = '14391123'"},"custom_tags":{"query":"SELECT * FROM custom_tags WHERE messages.id = '14391123'"},"moderation_status":"approved","visibility_scope":"public","user_context":{"type":"user_context","kudo":false,"read":false,"can_reply":false,"can_kudo":false,"can_delete":false},"message_type":"blog_topic_message","popularity":2.6623845696127435E-5,"excluded_from_kudos_leaderboards":false,"latest_version":{"type":"friendly_version","major":"4","minor":"0"},"include_hidden_messages":true,"content_workflow":{"type":"content_workflow","state":"publish","message_draft_history":{"query":"SELECT * FROM message_draft_history WHERE message.id = '14391123'"},"user_context":{"type":"message_workflow_context","can_edit":false,"can_schedule":false},"view_href":"https://community.sap.com/t5/blogs/blogworkflowpage/blog-id/technology-blog-sap/article-id/190198"},"is_promoted":false},"metadata":{}}