Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problem in CALL FUNCTION 'GET_JOB_RUNTIME_INFO'

0 Likes
2,072

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...

5 REPLIES 5
Read only

Former Member
0 Likes
1,385

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

Read only

koolspy_ultimate
Active Contributor
0 Likes
1,385

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.

Read only

0 Likes
1,385

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....

Read only

0 Likes
1,385

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

Read only

koolspy_ultimate
Active Contributor
0 Likes
1,385

Hi,

[Check this|http://www.abapprogramming.net/2007/04/debugging-in-abap.html]

Hope this solves your requirement.

Regards,

koolspy.