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

getting spool number at runtime

Former Member
0 Likes
484

Hi folks,

I am trying to execute a ALV report in background. How can generate spool at runtime if we execute our report background...Thanks in advance,,

ram...

Hi folks,

I am trying to execute a ALV report in background. How can generate spool at runtime if we execute our report background...Thanks in advance,,

ram...

1 REPLY 1
Read only

Former Member
0 Likes
390

Dear Ram,

here is the code

data: it_tbtcp like tbtcp occurs 0 with header line,

lv_spool type tsp01-rqident,

lv_spool1(10) type c.

DATA: gd_eventid LIKE tbtcm-eventid,

gd_eventparm LIKE tbtcm-eventparm,

gd_external_program_active LIKE tbtcm-xpgactive,

gd_jobcount LIKE tbtcm-jobcount,

gd_jobname LIKE tbtcm-jobname,

gd_stepcount LIKE tbtcm-stepcount,

gd_error TYPE sy-subrc,

gd_reciever TYPE sy-subrc.

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.

if not gd_jobname is initial and not gd_jobcount is initial.

SELECT single listident FROM tbtcp

INTO lv_spool1

WHERE jobname = gd_jobname

AND jobcount = gd_jobcount

AND stepcount = gd_stepcount

AND listident ne '0000000000'.

endif.

lv_spool1 is ypur required spool no

regards

abhinesh

Edited by: abhinesh mishra on Jun 11, 2008 10:23 AM