on 02-09-2007 4:11 AM
Hi All,
I had an ABAP program which is scheduled to reads a file at a unix directory.
But instead my program should get triggered when there is a Change to the existing file or a new file comes in in the unix directory.Is there any way to trigger?
Please provide your valuable suggestions , points will be granted for sure.
Thanks
Suman
The only way is that the program that creates or modifies files call the ABAP report, eg by raising a sapevt event.
If is it not possibile, you can schedule a script at OS level that periodically checks for new or modified files and calls sapevt if needed.
Cheers,
David
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Suman,
One approach would be to just regularly scan for your config file being modified
(just stat() and check st_mtime in unix) with date and timestamp... How often you want to check is up to you, but I wouldn't think more than once per minute would be necessary, unless you have some need to make changes instantly or something...
Another approach would be to use dnotify/inotify to have the kernel notify you when
the file changes...
Hope this helps
Cheers
Senthil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.