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

Trigger event for custome table without using TMG

Former Member
0 Likes
2,569

We have come up with requirement as below,

Consider there are two custom table A and table B. If one entry is created in table A, then table B should be updated with related data.

We have implemented the code for table maintenance generator. But in other case if user is not updating using TMG still it should update the table B.

How can we implement the above logic?

Thanks in advance.

7 REPLIES 7
Read only

matt
Active Contributor
2,091

How is the user updating table A, if not via TMG?

Read only

DoanManhQuynh
Active Contributor
0 Likes
2,091
Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,091

How did the 'user' updates the table if not in the TMG, did you really expect any SQL statement to trigger your code

  • Either look at trigger defined in database (from there no longer an Abap development subject...)
  • Or insure that your code is always executed by developping some update task FM and make sure every developper uses your FM
Read only

0 Likes
2,091

In any case if table will get update from abap code like modify. It should trigger event which will update other table.

Read only

0 Likes
2,091

Then you have to program the update to happen after the modify. As Raymond said

"insure that your code is always executed by developing some update task FM and make sure every developer uses your FM"

Read only

0 Likes
2,091

Yes I thought of this solution. But what if in future any developer will add code for Modifying table.
Is there any way to trigger event if the table in updated with new entry other than TMG events? Like from SWED or SWEC configuration?

Read only

2,091

You 'like from SWED', but SWED use change documents that are programmatically generated and executed by update task FM, so if some customer, or some sap on site ☺, uses some open sql statements they would not be triggered.