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

trigger ABAP program using UNIX script

Former Member
0 Likes
1,438

Hi All,

I want to trigger an Abap program whenever a unix file comes to SAP.

Can any1 please tellme how to write a unix script to trigger the ABAP program.

Thanks in advance.

4 REPLIES 4
Read only

Former Member
0 Likes
770

you will need to create a batch job in SM37 for the ABAP program, and use an event for the start criteria.

The event can be created in SM62

Then in unix, you will need to call an executable SAPEVT.

This will be in the directory /usr/sap/<SAPSID>/SYS/exe/run

you will need to use the appropriate profile for the SAP system to run the sapevt utility.

example :-

sapevt abap_event -t pf=/usr/sap/<SID>/SYS/profile/<SID>_DVEBMGS00_<SYSNAME> nr=00

Read only

0 Likes
770

Hi Paul,

In SAP I only have to create event e.g "ztrigger_event" right?

I am still not clear how this event is triggered when

we get the files to SAP host.

How exactly the shell script is written & where?

I don't know much about UNIX. So please guide me.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
770

Look at this OSS [Note 11661 - Event-driven call of background jobs does not work|https://service.sap.com/sap/support/notes/11661] and [Note 374379 - Triggering SAPEVT from a remote host|https://service.sap.com/sap/support/notes/374379]

Regards

Read only

0 Likes
770

hi

The requirement is to trigger event by a unix script which will be in application server.

Can u help me to understand how to run the unix script?

Should i write a program and schedule it as a BG job

or any sap programs are there to do it?