Skip to Content
0
Former Member
Aug 03, 2017 at 03:27 AM

Need help writing triggers

79 Views

Hi Experts,

I am facing one issue where I need to update one common output table based on database triggers on multiple source tables.

There are 9 different tables in S4 HANA system, which are replicated real time in Enterprise HANA system using SLT, we will use triggers to update the data on real time in one common table.

So, whenever any new records created or updated in any of those tables, the corresponding trigger will fire and use the view and update the final table real time.

Challenge:

There are 9 different independent tables here, and any table get update any time, and there is only one common final table to update, so if multiple tables are updated same time there is a possibility that the final tables get locked by one trigger and other triggers may fail to update corresponding record, or there can be deadlock situation.

We have to find a way to write the triggers in such a way that if one trigger is updating the table then others can wait and when the first trigger complete its update the second trigger will start.

Please let me know if anyone has a solution for this.

Thanks a lot

Ayan.