<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Database table triggers in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-triggers/m-p/6679853#M1449396</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a custom table(Ztable) on which I need to trigger a specific program everytime a record is inserted into this database table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This table might get updated thru various programs around 50 programs, so I cannot go to each program and make a change. So can some one suggest me a way, such that everytime&lt;/P&gt;&lt;P&gt;a DB table gets updated I want the system to generate some kind of event/ Idoc/ Signal informing about the &lt;/P&gt;&lt;P&gt;record being created with the record data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In short I want a functionality similar to that of&lt;/P&gt;&lt;P&gt;Triggers in SQL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;-Amit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 20 Mar 2010 20:57:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-03-20T20:57:33Z</dc:date>
    <item>
      <title>Database table triggers</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-triggers/m-p/6679853#M1449396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a custom table(Ztable) on which I need to trigger a specific program everytime a record is inserted into this database table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This table might get updated thru various programs around 50 programs, so I cannot go to each program and make a change. So can some one suggest me a way, such that everytime&lt;/P&gt;&lt;P&gt;a DB table gets updated I want the system to generate some kind of event/ Idoc/ Signal informing about the &lt;/P&gt;&lt;P&gt;record being created with the record data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In short I want a functionality similar to that of&lt;/P&gt;&lt;P&gt;Triggers in SQL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;-Amit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Mar 2010 20:57:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-triggers/m-p/6679853#M1449396</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-20T20:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: Database table triggers</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-triggers/m-p/6679854#M1449397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do a PL/SQL program then. That doesn't exist in SAP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Mar 2010 21:22:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-triggers/m-p/6679854#M1449397</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2010-03-20T21:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: Database table triggers</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-triggers/m-p/6679855#M1449398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create a class mit static method to create event. Use RPR_ABAP_SOURCE_SCAN to find the 50 or so (Z-) programs using your table. insert the line with the method call at all update/insert for the Z table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you don't wait, this is finished until noon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Mar 2010 21:38:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-triggers/m-p/6679855#M1449398</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2010-03-20T21:38:06Z</dc:date>
    </item>
    <item>
      <title>Re: Database table triggers</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-triggers/m-p/6679856#M1449399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm pretty sure that there's no such thing in SAP as database triggers, which you could use to retrofit your application to suit your needs (essentially not required, because you'd do that differently in SAP).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically I'd recommend refactoring your programs - I know it's a pain, but if the design was poor in the first place, it's the right thing to do. I don't think you want to switch your coding to database level as indicated in a previous posting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the design of the applications would've been right in the first place, you would have some kind of update module (e.g. an update function) that all programs call for updating your custom table. With this kind of approach your requirement is simple to implement, because then you'd only need to update the coding in the update module. That's why proper modularization of programs is so important.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyhow, probably you know all that and are just like most of us in the awkward position of implementing new requirements on existing, organically grown, poorly designed coding with the common &lt;EM&gt;hammer argument&lt;/EM&gt; of minimal costs. However, I personally think that it's better to &lt;EM&gt;bite the bullet&lt;/EM&gt; at some time, because certain refactorings are clearly beneficial as they will simplify program support and maintenance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers, harald&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Mar 2010 21:49:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-triggers/m-p/6679856#M1449399</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-20T21:49:20Z</dc:date>
    </item>
  </channel>
</rss>

