2017 Sep 28 11:04 AM
Hello Experts,
We have a requirement where a report has to be executed when a new file is placed in AL11 directory. This file is the input to the report.
We can schedule a background job which reads file periodically. But, this approach is not a real time.
The approach should be something similar to IDOC Functionality. Whenever a new IDOC enters the system, it will call the Function Module assigned to it.
Please let me know if there are any ideas or solution.
Best Regards,
Kiran Kerudi
2017 Sep 28 4:59 PM
This is easiest to do at the OS level, a simple unix/Linux/Windows/whatever script to call an RFC FM to tell SAP to process a file.
2017 Sep 29 3:19 AM
Thanks Mike!
Is there anything from SAP that we could do to identify the new file added? The file names will have time stamp. So, periodic scheduling is not an option as it would miss some files.
Best Regards,
Kiran
2017 Sep 29 9:32 AM
Of course. The exact implementation depends on the OS of your application server (*nix, Linux, Windows, Z-OS, ???). You're probably best off talking to basis as it's almost guaranteed they will already have some kind of file monitor script running somewhere and it's best to use the same setup consistently in an environment.
You can write an RFC-enabled Z-FM to do whatever you like with the file, and within the script you can call the FM with the filename and other parameters. Example here: link
2017 Oct 02 2:34 AM
Thanks a lot Mike!
I will check with Basis Team and get back. Your comments were really helpful!
Best Regards,
Kiran Kerudi
2017 Oct 05 5:07 PM
I believe third-party solutions like Redwood can do this too but they cost extra, of course. Might be worth evaluating though for a serious project.