Help Required To Write A Generic Trigger Procedure

Status
Not open for further replies.

NThomas

New Member
Hi All,

Could you please help me to write an generic trigger program, where it can be attached to any table as the operation it is going to perform is the same.

Is this can be achieved using any system tables?

Below is the sample trigger program.

The table name should be able arrived based on the table to which the trigger is attached.

TRIGGER PROCEDURE FOR WRITE OF <TABLE-NAME> OLD BUFFER OLD_TABLE_NAME.
DEF VAR V_LOGICAL AS LOGICAL NO-UNDO.

BUFFER-COMPARE TABLE_NAMETO OLD_TABLE_NAME SAVE RESULT IN V_LOGICAL.

IF NOT V_LOGICAL THEN
DO:
Message <table-name>
END.
 
Status
Not open for further replies.
Top