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

Running Program after SQL Change

Former Member
0 Likes
484

Hello Everybody,

I'm looking for a bit of advice on how to handle a situation.

I've currently written a program that takes information from a SQL database and exports it out of SAP. The information is then run through an encryption and stored somewhere else remotely. The program right now runs every 48 hours. Though the question now is that the customer wants the information up-to-date at all times. When a user makes a change to the database, he wants the information to be exported and encrypted afterwards.

Can you with SAP automatically launch a program after a change to a database? Or create a sort of listener? If so, how would you approach the situation?

3 REPLIES 3
Read only

Former Member
0 Likes
455

I have two ideas on how to handle this situation.

the 1st is easy to implement, but is the worse one from point of system quality. Run a program in batch every minute, checking wheather there are new oder modified entries by reading the date of modification of the datasets, e.g. select all datasets being edited or created within the last minute.

The better way is to find a user exit before saving the dataset. Start your function module to sent the data to the external database in this user exit.

Read only

Former Member
0 Likes
455

Hi,

Running the Job every half an hour may help.

Thanks,

Venkatesh.

Read only

former_member201275
Active Contributor
0 Likes
455

Not sure exactly your requirement but if it is a bespoke table you can create event management for this i.e.:

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/8129f164-0a01-0010-2a8e-876528725...