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

Automatic Program execution

Former Member
0 Likes
841

Hi experts,

I have a requirement wherein when a file is written into application server by third party application, based on the name of the file an ABAP program should get executed that reads the file and uploads data into SAP. Can you please let me know of the different possibilities for achieving this? I do not want to schedule a job which will run for every given time period rather Is there any way through which we can trigger an event etc.

Please help.

Thanks,

Vinita

8 REPLIES 8
Read only

Former Member
0 Likes
797

you can try finding exit, or some event.

havent tried this scenario ever before though

Read only

Former Member
0 Likes
797

We did something similar once. It worked like this.

The BASIS guy defined a DAEMON which ran constantly to monitor if a file was placed in the directory. When it detected a file it captured the file's name and raised an event in SAP passing the filename as a parameter (or at least that is how I remember it).

Meanwhile in SAP we had defined a job to run "at event".

Read only

ThomasZloch
Active Contributor
0 Likes
797

SAP delivers a program "sapevt" that runs on the respective OS and triggers events that can be used to start jobs in SAP.

Instead of a daemon we have used a shell script that calls "sapevt" (among others things), and the shell script in turn is started by the file transfer process, right after the file has been transferred successfully.

Check the web for info for keyword "sapevt".

Thomas

Read only

Former Member
0 Likes
797

Hello Vinita,

Do you know dude who is from pune?

Cheers

Read only

0 Likes
797

Amit, you have an elephant's memory

Read only

0 Likes
797

Since I have elephant's memory Then I must say you have an dynasore's one

Cheers

Read only

Former Member
0 Likes
797

Hi,

This can be achived by writing an ABAP program using datasets. first specify the name and format of the file (i.e <filename_date_time>) in the application server. Maintain a Ztable in which the file name should be updated for each program execution run. The selection screen of the program should be Unix path and the program will fetch the file name using data set and comparing the file name in the application server with the Ztable maintained to identify the one which is not processed.

while conforming the file open the data using syntax open data set and populate it into internal table. after that you can update it into relevent table and also the program can have background schedule job.

Regards,

Anil

Read only

rainer_hbenthal
Active Contributor
0 Likes
797

Use [sapevt|http://www.google.de/url?sa=t&source=web&ct=res&cd=1&ved=0CAoQFjAA&url=http%3A%2F%2Fhelp.sap.com%2Fsaphelp_45b%2Fhelpdata%2FEN%2Ffa%2F096e6b543b11d1898e0000e8322d00%2Fcontent.htm&ei=y6_ESpjQNY794AaKrdRF&rct=j&q=sapevt+parameters&usg=AFQjCNEyHzyokOQyQbx8lELR7AUw8R9mpQ]