Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
Showing results for 
Search instead for 
Did you mean: 
Active Participant

Nodejs runtime for CAP released a feature to support "Mass Edit" feature of SAPUI5 in December 2023 (v 7.5). The release notes featured an animation showcasing the feature. But, I could not find the sample application shown in the animation. I managed to patch cap-sflight sample application to reproduce the animation.  

Changes made are:

1. Enable the feature bypass_draft in cap nodejs runtime. This requires @Sap/cds:7.5.3 or later. 

2. Enable mass edit for the Fiori Elements application. I used SAP UI version 1.120.1.  Changes are required in manifest for the application. 

3. Patch the event handler for to handle the new request. Enabling the feature bypass_draft introduces new entry point to the application as warned in release notes. This is UPDATE request with method as PATCH. Entities enabled for draft always had the full business object handed over from draft on update. Now, with this feature PATCH request arrives with partial data containing only the modified fields. I made a lazy patch in the event handler so as to bypass all validations for this new entry point. This is not correct and is done only for reproducing the feature. 

The patch is attached. You can apply the patch on the main branch after cloning the repository for cap-sflight sample application, with command git apply bypass_draft_patch.txt

Hope this helps you evaluate if you want to enable the feature in your application.

Labels in this area