Skip to content

Instantly share code, notes, and snippets.

@grknylmz
Created September 20, 2017 07:20
Show Gist options
  • Save grknylmz/fed10d3520ee9492c2d6004744a7f412 to your computer and use it in GitHub Desktop.
Save grknylmz/fed10d3520ee9492c2d6004744a7f412 to your computer and use it in GitHub Desktop.
// Give name to a trigger
CREATE TRIGGER "SAPABAP1"."BUT000_I"
// State which schema and table to replicate
AFTER INSERT ON "SAPABAP1"."BUT000"
// Give reference name for each row
REFERENCING NEW ROW BUT000_REF FOR EACH ROW
BEGIN
IF :BUT000_REF.CLIENT = '100'
THEN INSERT
//Give which table to insert and state columns
INTO "SAPABAP2"."ZBUT000" VALUES('100',
:BUT000_REF.CLIENT,
:BUT000_REF.PARTNER,
CURRENT_UTCTIMESTAMP,
'I' )
;
END
IF
;
END
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment