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

Tracking data changes in SM30 for a single table.

Former Member
0 Likes
2,658

Good day.

It is necessary to duplicate the changes made in the standard table (T352R) and copy changes through PI (PO) to another system.

What is the best way to do it?

On this table there are a standard generator of reference for the SM30 (transaction OIOB).

We can create your Table maintenance generator and change z modules, but in this case all changes will be overwriten  if someone then call to rebuild generator.

May be SM30 have a a user exit when saving data which will be triggered for a particular specified table.


Did somebody face a similar problem?

The full copies of data from T352R to another system is not acceptable, the customer does not accept. He wants to copy only changes.

1 ACCEPTED SOLUTION
Read only

PeterJonker
Active Contributor
0 Likes
1,803

But what if any changes happen programmatically (not with SM30), then a user exit in SM30 would not be called.

You could schedule a custom program that reads the table every day,  and read a copy table also (custom table e.g. ZT352R) where the data of the previous day is stored.

In your programm you compare the two tables and determine what has been changed.

Now these entries you can send and then empty the ZT352R table and fill again with full data of today's T352R.

That way you create  a snapsot every day in a custom tabel with which you would be able to compare the current entries with the ones that were in the table the last time the programm has run.

And if you are at it I would also create a possibility where you can select entries to be synchronised manually from table T352R in case anything went wrong. (recovery option). I would only recommend this if the data in the table is not too huge.

**********

Now I had a look at the table T352R I see that you can also query the fields AENAM AEDAT ERNAM ERDAT to see if any changes have been made.

Good day.

It is necessary to duplicate the changes made in the standard table (T352R) and copy changes through PI (PO) to another system.

What is the best way to do it?

On this table there are a standard generator of reference for the SM30 (transaction OIOB).

We can create your Table maintenance generator and change z modules, but in this case all changes will be overwriten  if someone then call to rebuild generator.

May be SM30 have a a user exit when saving data which will be triggered for a particular specified table.


Did somebody face a similar problem?

The full copies of data from T352R to another system is not acceptable, the customer does not accept. He wants to copy only changes.

4 REPLIES 4
Read only

former_member201275
Active Contributor
0 Likes
1,803

I cannot see any change pointers for this table. Also you would take the view data across i.e. V_T352R and not just the table, or?

How big is the view on your system? I think if the table content is not large then why not simply copy everything across? It’s certainly going to be far simpler than creating enhancements and stuff… in my opinion anyway. If it is a very large table then of course it maybe makes sense just to copy changes. If you copy everything then on the Receiving System if the entry already exists it will simply be overwritten with exactly the same data so there won’t be any damage done?

Read only

PeterJonker
Active Contributor
0 Likes
1,804

But what if any changes happen programmatically (not with SM30), then a user exit in SM30 would not be called.

You could schedule a custom program that reads the table every day,  and read a copy table also (custom table e.g. ZT352R) where the data of the previous day is stored.

In your programm you compare the two tables and determine what has been changed.

Now these entries you can send and then empty the ZT352R table and fill again with full data of today's T352R.

That way you create  a snapsot every day in a custom tabel with which you would be able to compare the current entries with the ones that were in the table the last time the programm has run.

And if you are at it I would also create a possibility where you can select entries to be synchronised manually from table T352R in case anything went wrong. (recovery option). I would only recommend this if the data in the table is not too huge.

**********

Now I had a look at the table T352R I see that you can also query the fields AENAM AEDAT ERNAM ERDAT to see if any changes have been made.

Read only

former_member201275
Active Contributor
0 Likes
1,803

… another possibility would be to create an RFC type PI interface. Essentially then you copy everything in the table, send all of the data through in PI, this then calls your RFC on the receiving system. Your RFC then loops through this data, compares each entry and if it already exists simply do not update the V_T352R with this entry, otherwise update, etc...?

Read only

Former Member
0 Likes
1,803

What about Menu Enviroment-Modification-Events for Table maintenance generator of V_T352R view?

They alredy have stdandart events for this View but may be I can create new event

01 Before saving the data in the database.

It would be treated as modification but really it is new separated code.