Skip to Content
avatar image
Former Member

How to execute a report in background whenever any file is uploaded in particular SAP-Directories?

Hi,

I'm developing a report which will fetch data from .txt file from SAP-Directories (AL11) and will do the needful processing.

What I want is that whenever any file is uploaded into my directory in AL11, that report should execute in background.

Please help.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Aug 06, 2017 at 09:01 PM

    I don`t think there is an automatic trigger for file changed/added!

    I´d poll the directory for new files with an periodic background job or, if it`s more time critical, use some external trigger like RFC function module or HTTP request.

    kr

    Add comment
    10|10000 characters needed characters exceeded

    • If you properly write your program as a layered application, it should not be an issue implementing another interface (i.e. wrapping a web service around it). If it isn't a simple job, then that suggests you need to redesign your report.

  • Aug 08, 2017 at 02:08 PM

    Well this is not complete answer but i hope it helps you.

    I remember in good old days there was an SAP program called sapevt.exe that resides on application server (i am talking about Windows OS). What this program can do was to trigger a background event (transaction code SM62, SM64) in application server.

    so the idea was that we have a background job scheduled whose trigger was background event lets assume ZEVT1. now on application server our system administrator has written a script that check the directory for new files and if it finds the file, it calls sapevt.exe with required parameters to trigger the background event (script runs on the OS level, can't remember if this was a bat file or VBscript).

    Once the event is triggered, the background job would start on application server (that was bind with this event) and in the job the program process the file.

    So much time has passed since then, i hope some new method will be available now to address this issue :-)

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 09, 2017 at 02:21 PM

    There is a function module 'EPS_GET_DIRECTORY_LISTING' which will read a file directory and bring back any file names in the directory. You can create a report to poll the directory and set up a job with this report to run periodically.

    Add comment
    10|10000 characters needed characters exceeded