10-25-2006 6:50 AM
Hi All,
I have an urgent requirement where in I have to Submit a Program in Background, and trigger it using an event.
The following is the process followed,
Step 1,
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = jobname
IMPORTING
jobcount = gv_jobcount
Step 2,
Submit the Program in Background,
SUBMIT zf_ddi_activity_closure with
p_kunnr = i_kna1-kunnr
VIA JOB jobname
NUMBER gv_jobcount
AND RETURN.
Step 3,
Close Job,
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
event_id = event_id
jobcount = gv_jobcount
jobname = jobname
Step 4,
Triggering the Event,
CALL FUNCTION 'BP_EVENT_RAISE'
EXPORTING
eventid = event_id
This proceedure is not working could anyone let me know of any other way.
Thanks in advance,
Vijay
10-25-2006 6:56 AM
Hi Vijay
How about approching this way.
1. Define the event.
2. Define a JOB via SM36 with start condition as AFTER EVENT.
3. Raise the event accordingly.
Hope this will serve your purpose.
Kind Regards
Eswar
10-25-2006 7:22 AM
Hi,
instead of your 4 steps try fm K_BATCH_REQUEST
(look documentation with se37 1st)
A.