2011 Oct 04 5:50 AM
While working in PDF attachment I am using
Function 'GET_JOB_RUNTIME_INFO' as bellow
CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
IMPORTING
eventid = gd_eventid
eventparm = gd_eventparm
external_program_active = gd_external_program_active
jobcount = gd_jobcount
jobname = gd_jobname
stepcount = gd_stepcount
EXCEPTIONS
no_runtime_info = 1
OTHERS = 2.
But I am getting gd_jobname, gd_jobcount,gd_stepcount blanck
So please help...
Hi,
You should execute this only in background.... This FM measures the runtime of the background job and will not return anything except the exception during foreground execution
Edited by: SrikanthRS on Oct 4, 2011 8:27 AM
2011 Oct 04 6:42 AM
Try this.....
PARAMETERS: V_EVTID LIKE TBTCM-EVENTID,
V_EVTPRM LIKE TBTCM-EVENTPARM,
V_JOBNAM LIKE TBTCM-JOBNAME.
CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
IMPORTING
EVENTID = V_EVTID
EVENTPARM = V_EVTPRM
JOBNAME = V_JOBNAM
EXCEPTIONS
NO_RUNTIME_INFO = 1
OTHERS = 2.
IF SY-SUBRC NE 0.
WRITE:/'ERROR IN FUNCTION'.
ELSE.
WRITE:/ 'JOB', V_JOBNAM, 'STARTED WITH EVENT', V_EVTID, 'AND PARAMETER', V_EVTPRM.
ENDIF.
Regards
Ajit
2011 Oct 04 7:03 AM
Hi,
[You must check this once|http://wiki.sdn.sap.com/wiki/display/Snippets/Getsinformationaboutajobfromabap+editor.]
This link may be helpful to you.
Regards,
koolspy.
2011 Oct 04 7:21 AM
Tried with above code and as per link both are the same
But again Job_name is getting blank...
Getting Sy-subrc 1 that is No run time info....
Please Help....
2011 Oct 04 7:27 AM
Hi,
You should execute this only in background.... This FM measures the runtime of the background job and will not return anything except the exception during foreground execution
Edited by: SrikanthRS on Oct 4, 2011 8:27 AM
2011 Oct 04 8:30 AM
Hi,
[Check this|http://www.abapprogramming.net/2007/04/debugging-in-abap.html]
Hope this solves your requirement.
Regards,
koolspy.
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |