Mocking events from SAP S/4HANA

This commit is contained in:
D065023
2021-05-18 09:03:18 +02:00
committed by Daniel Hutzel
parent c6239f0375
commit 6b08826af5
3 changed files with 23 additions and 3 deletions

View File

@@ -0,0 +1,11 @@
const cds = require("@sap/cds");
module.exports = cds.service.impl(function () {
const { A_BusinessPartner } = this.entities;
this.after("UPDATE", A_BusinessPartner, (data, req) =>
this.tx(req).emit("BusinessPartner.Changed", {
BusinessPartner: data.BusinessPartner
})
);
});