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

Program which put files into AL11

Former Member
0 Likes
2,753

Hi,

The situation is following:

File .csv comes from external system into SAP. It is put into AL11 directory path.

I want to create background job which is triggered "After event" to read this file.

So I need to create event in SM62. But I don't understand what is event in this case. Is that a program which put file into AL11? If yes than what is program name? And how can I define that it should be triggered only in case when file came into specific directory path?

Thanks,

5 REPLIES 5
Read only

matt
Active Contributor
2,543

When I've done this, I've created a batch job watcher that looks for files written to the folder. If it spots one, it immediately moves it to another folder from where it is processed.

The batch job runs, say, every ten minutes.

The way you might use events is that the batch job above triggers the event that causes the process to happen. But simply writing the file into the folder won't trigger and SM62 event.

Read only

Sandra_Rossi
Active Contributor
2,543

A job event is triggered by Linux script sapevt (or Windows sapevt.exe), or ABAP CL_BATCH_EVENT=>RAISE, etc.

If you use a Linux script, you will first put the file and then trigger sapevt.

Read only

0 Likes
2,543

Yes.

I can set up periodic job, for instance each 10 minutes. It also works.

But request is to run job only in case file came to SAP.

Read only

matt
Active Contributor
2,543

I understand that, but at some point there will be monitoring and resources being used. If you opt for Sandra's sapevt, you'll need to set something up to check if a file has arrived. Maybe there's an easy way of doing this in linux/windows, but in the past I've had to use a regularly running daemon.

Read only

abo
Active Contributor
2,543

matthew.billingham that would be "inotifywait"