cloud-cap-samples
cloud-cap-samples copied to clipboard
Adding suppliers showing integration with S/4
Still work in progress ... :) Partly because it uses some convenient shortcuts we just added to be published with upcoming release, like this one:
class DatabaseService {
...
/** Convenience shortcut to check whether an entity instance exists */
async exists (entity,key) {
return this.run (SELECT(1).from(entity,key))
}
}
Rationale for that one: I'm afraid many would just do something like this:
let exists = db.read('Books',201)
if (exists) ...
But this would do a SELECT * which might read tens or hundreds of element data unnecessarily
Latest commit requires https://github.wdf.sap.corp/cdx/cds/pull/2114