02-13-2014 1:20 PM
Hi
I want to get spool number I am using this function module
CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
IMPORTING
eventid = w_eventid
eventparm = w_eventparm
external_program_active = w_external_program_active
jobcount = w_jobcount
jobname = w_jobname
stepcount = w_stepcount
EXCEPTIONS
no_runtime_info = 1
OTHERS = 2.
* Get Spool Number
SELECT * FROM tbtcp
INTO TABLE t_tbtcp
WHERE jobname = w_jobname
AND jobcount = w_jobcount
AND stepcount = w_stepcount
AND listident <> '0000000000'
ORDER BY jobname
jobcount
stepcount.
but the function module is not fetching any thing .
02-13-2014 2:09 PM
Hi,
if you are looking for your current spool number you just need to check sy-spono after a WRITE statemet is done.
Marco
02-13-2014 3:37 PM
Hello Rohit,
As I understand I guess you are scheduling job in your program by using JOB_OPEN and JOB_CLOSE.
If means after the job close call the FM " BDL_READ_JOB_STATUS" to check whether the job finished.
Then call your FM "GET_JOB_RUNTIME_INFO" and SELECT query, after the JOB_CLOSE, because the spool will be created after the job is finished.
Regards,
Thanga
02-17-2014 5:55 AM