Forum Stats

  • 3,728,545 Users
  • 2,245,651 Discussions


How to handle exception of trigger created on base table

User_E97G7 Member Posts: 35 Green Ribbon

Hi Experts,

We have a requirement where we want to create trigger on MTL_SYSTEM_ITEMS_B. The trigger will check whenever reserve flag is updated on item, then trigger has to fire and capture the details in a custom table(The details we are capturing are: Old and New values of reserve flag, WHO Columns and few other).

Now, my doubt is how can we handle exception in a trigger. Is it allowed? Because, we are not sure what and when an error will occur right...?

As I said before, my trigger will have simple INSERT INTO CUSTOM TABLE statement.

If we handle exception(Which I need to know), how the application will show when we are updating reserve flag from application and how it will be displayed when we update the reserve flag by using UPDATE command from DB.

Thanks in Advance,



  • JohnWatson2
    JohnWatson2 Member Posts: 4,228 Bronze Crown

    You should not be doing this at all! Creating triggers on the supplied tables is not supported and the next time you apply a patch or upgrade, heaven knows what will happen. What you should be doing is connecting to the Alert Manager Responsibility, and creating appropriate Alert Actions. If you need more complex logic, then use a Workflow. This is made clear in the various docs regarding RBS development and numerous MOS articles.

    My own experience is that breaking the rules as you are doing may give you a quick fix, but you are stacking up problems for the future. Up to you, I suppose! Though it will be your client who pays the price.

  • User_E97G7
    User_E97G7 Member Posts: 35 Green Ribbon

    Hi John,

    Thank you for enlightening me on this :)

    I will update the same to them. Lets see what they respond



Sign In or Register to comment.