Skip to Content
avatar image
Former Member

Scheduling a job which is triggered by an event- availability of a file in SAP application server

Hi all,

I need to schedule an event triggered background job. I need the job to be triggered whenever a file reaches the sap application server from SSP5. For now, the job is scheduled daily and it fails whenever it doesn't find the file, this again requires re-processing. The requirement is from the ABAP team and I am from Basis. I see a possibility where they come up with a program to check the file availability and this triggers the job but again not sure how feasible this is for them.

Please let me know if this would be at all possible. Thank-you all.


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jun 25, 2012 at 11:49 AM

    Hi Rosun,

    I have an idea! Without help of ABAPers this can be achieved.

    Create a SAP event with SM64 with suitable name.

    If your system is on Windows then use batch job and windows job scheduler, if Unix use script file and cron.

    Goto this link and check out the way how an event can be generated, and create a script/batch file and check the file at OS level if found then generate the event else do nothing. Schedule this file hourly or after every 30 minutes whatever suits you. In this way, when file will be found at OS level the SAP event which you have created already will be triggered and SAP Job will start.

    So only thing left is to write the batch file or Unix script to check the presence of file at OS level and use of if-else ....  Our friend Google can be handy here 😉

    Add comment
    10|10000 characters needed characters exceeded

    • Hi,

      to trigger any sap event at OS level execute this on your sap application server

      sapevt <The name of event defined in SM64> pf=<Profile Name with full path>

      As you have Windows, make a batch file, the batch file will contain this sapevt line inside a if condition.

      The if condition will check with help of dir commad about the presence of file and execute the sapevt.

      I'm giving you hints for your homework......

  • avatar image
    Former Member
    Jun 25, 2012 at 10:19 AM
    Add comment
    10|10000 characters needed characters exceeded