Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Event/Message when Data changed

Former Member
0 Likes
792

Hi, I am new to ABAP and is already thrown into the fire. Can someone please tell me is there a way to get an Event or Message fire when data changed in a table.

I see we can log data changes with the 'Log Data Changes' flag in ABAB Dictionary Technical Settings. However, I will have to scan the table because there is no event (is this true?)

Are there other natural ABAP approach to do what I want?

Thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
635

Hi Chris,

Yes it's possible to create events for your case.

But how much effort is required will depend on your table. If a chnage document is already provided by SAP for that then you can check below transactions and go through application help to find more:

You need to check / configure the settings in all the three Xns given below:

Transaction SCDO ( Change documents : these documents gets created, whenever any change is made in related tables - The change document info is stotred in CDHDR and CDPOS tables). You need to check which change document is for your table or is there any ?

Transaction SWED ( Change Document Object - Workflow Object type ) Events & Primary keys are assigned here for relevant change cases.

Transactionn SWEC ( Event - Change document linkage is maintained here ).

Together, it means for any change in the table a change document will be created -->depending on the change type ( created/ chnaged/ deleted ) an event will be triggered.

Further, if you want that some activity should take place after this event then you should crate a workflow using trsnaction SWdd and provide the raised event as triggering event of workflow.

In the workflow, you can send mails or do some further processing.

Thanks,

Ram

2 REPLIES 2
Read only

Former Member
0 Likes
636

Hi Chris,

Yes it's possible to create events for your case.

But how much effort is required will depend on your table. If a chnage document is already provided by SAP for that then you can check below transactions and go through application help to find more:

You need to check / configure the settings in all the three Xns given below:

Transaction SCDO ( Change documents : these documents gets created, whenever any change is made in related tables - The change document info is stotred in CDHDR and CDPOS tables). You need to check which change document is for your table or is there any ?

Transaction SWED ( Change Document Object - Workflow Object type ) Events & Primary keys are assigned here for relevant change cases.

Transactionn SWEC ( Event - Change document linkage is maintained here ).

Together, it means for any change in the table a change document will be created -->depending on the change type ( created/ chnaged/ deleted ) an event will be triggered.

Further, if you want that some activity should take place after this event then you should crate a workflow using trsnaction SWdd and provide the raised event as triggering event of workflow.

In the workflow, you can send mails or do some further processing.

Thanks,

Ram

Read only

Former Member
0 Likes
635

Hi chris,

You can use transaction SE54 to create and assign events to a table. once if it been created then you can create your own form routine in that event for specific trigerring actions. Now in that from routine you can put your required ABAP code.

if you requrie more info do let me know.

Regards,

Jagath.