Retrieving the event and parameters in an abap program
Hello ,
I want the retrieve the event-name and parameter in the abap program that has triggered the execution of the program :
E.g. :
PROG1 is the first step of JOB ZZZ.
This job will start on event 'ZTEST'. ( Without any parameter )
When you trigger the event ZTEST with parameter 'TEST' , the job ZZZ will start running.
Now I want to check in program PROG1 which parameter of the event was used to start the job. ( In other words , want to check on the parameter 'TEST' )
Is this possible ?
Thanx in advance,
AQC
You need to rephrase your question as ZTEST is NOT an SAP event.
But, it sounds like what you need to do is read the job log which will identify the variant used. If you need to record the actual parameters then I would suggest that you update a user table.
I'm not sure that's answered your question, but then I'm not sure what your question is.
Dr Sidewalk
_________________
"In the middle of difficulty lies opportunity" - Albert Einstein
"Money isn't everything in life, unless you don't have it". David King
"Fail to plan, plan to fail"
"Success is a journey, not a destination."
Hello Dr Sidewalk ,
As you know , you can define your own events in SM62.
When you plan the program in background (SM36/SM37) , you can specify that the job will start after your event + a parameter.
So when you trigger e.g. manually the event via SM64 , you have to specify your event + the parameter. Both settings can be settup in the jobplanning. ( So above )
Now when the job starts ( that executes my program ) , I want to know which event & parameter has started the job.
Kind regards ,
AQC
No chance to find out!
(You can't even find out whether the job was triggered by an event or whether it was scheduled with "start immediately".
Because, if an event is triggered, but all BTC processes are busy, the system will schedule a job with "start immediately", which starts as soon as a BTC process is waiting, and there are no jobs with higher priority in the queue.
That means, the information which event triggered the job got lost.)