[57740] in SAPr3-news
Re: how to trigger an ABAP program (with parameter) using sapevt?
daemon@ATHENA.MIT.EDU (Christian Zalto)
Fri Jul 21 02:58:16 2006
To: sapr3-news@mit.edu
Date: Fri, 21 Jul 2006 08:55:29 +0200
From: "Christian Zalto" <zalto@t-online.de>
Message-ID: <e9ptpg$pu8$03$1@news.t-online.com>
<ggk517@gmail.com> write:
> I have an abap program which can only run with parameters. I wish to
> trigger this abap program in unix level using sapevt. I am not sure how
> to specify those required parameters of the abap program in sapevt
> command.
I don't think that there is an easy way to access SAP event parameters
from a report, that is called in a step of a job triggered by an event.
Most possibly you'll have to write your own "report launcher" that
tries to find out the job context that it was called from to get the
event and its parameters and then launches the report with these
parameters. But I'm not even sure that this is possible, because the
event parameters might not be written to a database table and they
exist just during the "event execution time" until the event subscriber(s)
are/is found.
Two possible workarounds: If there is a limited number of given
event parameters, you could define one job for each of them. This
is however, not useful, for a parameter like "customer number",
you'd have hundreds or thousands of jobs to be predefined.
The other workaround would be not to use SAPEVT but an
alternative report triggering/code execution mechanism that
requires proper logon with username and password, like RFC.
Maybe I'm missing something but for me SAPEVT always seems
to be quite an insecure solution: Anyone on the network can fire
events using the SAPEVT tool and launch predefined jobs and
other activities in the SAP system without any authentication!
You'll be in big trouble trying to find out where this event came from.
--
Christian Zalto