2008 Mar 12 9:01 AM
Hi friends!
I am trying to submit a report from a program and take the output into a Spool as it is dynamic.
Could you please tell me how can I get the dynamic SPOOL number.
I tried that by capturing the SPOOL NUMBER into memory via current system time and date but this will fail if 2 spools will generate at the same time.
Any thoughts!
2008 Mar 12 9:31 AM
Hi friends!
I am trying to submit a report from a program and take the output into a Spool as it is dynamic.
Could you please tell me how can I get the dynamic SPOOL number.
I tried that by capturing the SPOOL NUMBER into memory via current system time and date but this will fail if 2 spools will generate at the same time.
Any thoughts!
2008 Mar 12 9:14 AM
Hi,
If you want to get the output of your report as spool, Just execute the report in Background. Then check the job in SM37, there you can find the Spool display.
2008 Mar 12 9:18 AM
Hi,
In SAP Easy Access Menu
System -->Own Spool request
You Can Get The Number there
Reward If Helpful
Regards
Sandipan
2008 Mar 12 9:24 AM
Thank you.
Guys, the spool will be created via program that too dynamically and I need to capture that spool to convert it to PDF.
2008 Mar 12 9:31 AM
2008 Mar 12 12:28 PM
Have tried that too.
But that system spool field is not filled.
Thanks.
2008 Mar 12 12:46 PM
Hi Park.
DATA: print_parameters TYPE pri_params,
archi_parameters TYPE arc_params,
valid_flag(1) TYPE c.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
archive_mode = '3'
IMPORTING
out_parameters = print_parameters
out_archive_parameters = archi_parameters
valid = valid_flag
EXCEPTIONS
invalid_print_params = 2
OTHERS = 4.
IF valid_flag = 'X' AND sy-subrc = 0.
SUBMIT submitable TO SAP-SPOOL
SPOOL PARAMETERS print_parameters
ARCHIVE PARAMETERS archi_parameters
WITHOUT SPOOL DYNPRO.
ENDIF.
This Will work.
Pls Reply if ur prblm is resolved.
Thanks
2008 Mar 12 12:56 PM
Hi,
If there is no spool means no output has generated from your program. Try to check in SP01 or table: TSP02F where the generated spools will be displayed.
If you are sure that the spool will be generated, try to debug and find why no output is generated.
2008 Mar 12 1:02 PM
Thanks Mahammad!
I have done exactly the same but I need to know what spool number is created for that so that I can take that spool and convert to PDF.
Thanks.
2008 Mar 13 12:17 PM
2008 Mar 13 2:56 PM
Hi Park,
DATA: number TYPE tbtcjob-jobcount,
name TYPE tbtcjob-jobname VALUE 'JOB_TEST',
print_parameters TYPE pri_params.
************************************************
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = name
IMPORTING
jobcount = number
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc = 0.
SUBMIT ytest TO SAP-SPOOL
SPOOL PARAMETERS print_parameters
WITHOUT SPOOL DYNPRO
VIA JOB name NUMBER number
AND RETURN.
IF sy-subrc = 0.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = number
jobname = name
strtimmed = 'X'
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
OTHERS = 8.
IF sy-subrc <> 0.
...
ENDIF.
ENDIF.
ENDIF.
*****************************
From this u will get the job no. ->JOBCOUNT = number
with this jobcount read table TBTCP with key jobcount.
u will get the spool no.(LISTIDENT) from tht table.
use tht spool no to convert the spool to pdf.
Thanks
2008 Mar 18 10:47 AM
2008 Mar 13 3:39 PM
Hi,
u can use this.....
submit <report name> to sap-spool.
check its syntax (F1 hlp) for options available...
thanks Amit..
reward if helpful..
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |