2008 Jun 11 8:36 AM
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...
2008 Jun 11 9:22 AM
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
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |