2005 May 16 4:47 PM
Hello,
I have a program producing two spools using NEW-PAGE, it runs in background mode and they are displayed in SP01.
The user wants to see both spools via SM37, but only the
last spool is displayed, how can I presents multiple spools from SM37 ?
Any help will be appreciated.
Thanks
Hello,
I have a program producing two spools using NEW-PAGE, it runs in background mode and they are displayed in SP01.
The user wants to see both spools via SM37, but only the
last spool is displayed, how can I presents multiple spools from SM37 ?
Any help will be appreciated.
Thanks
2005 May 16 4:57 PM
If you select the job and hit the Spool button (or Goto->Spool List) all the steps in the job will be displayed. Place the cursor on a step and hit the Spool button again. This should display all the Spools for the step. Each spool can then be selected and displayed.
Cheers,
Ramki Maley
2005 May 16 6:52 PM
Thank you Ramki,
But in SM37 I only see the last spool generated by the program, I'm in 46c version.
2005 May 16 7:19 PM
Eduardo ,
Here is a simple example program that creates three different spool files. I'm able to see each one of the three files from transaction SM37. Try this code out.
Bruce
data v_count(2) type n.
data v_text(30).
data: cover_text(68).
do 3 times.
add 1 to v_count.
concatenate 'LIST #' v_count into v_text.
concatenate sy-repid(8)'-' 'Spool' '-' v_count into cover_text.
new-page print on
destination 'LB9' "<<== my printer
receiver 'TJOSVOB'
cover text cover_text "<<== Title or Spool req. name
list name v_text
list dataset v_text
immediately ' ' " X means print now
keep in spool 'X' " X means keep spool
new list identification 'X'
no dialog .
write: / v_text.
new-page print off.
enddo.
2013 Mar 27 1:10 PM
Hi Bruce thanks for giving The piece of code I tried and it is working perfectly Fine.
Hi friends just you need to change the DESTINATION and RECEIVERin the below code . And scheduled your Report as background job. and Then see in SM37->Spool you will find multiple records and 1 output for every record .Like this:
Spool no. Type Date Time Status Pages Title
15260 Outpu1 27.03.2013 12:52 - 1 ZJITU1-Spool-01
15261 Outpu2 27.03.2013 12:52 - 1 ZJITU1-Spool-02
15262 Outpu3 27.03.2013 12:52 - 1 ZJITU1-Spool-03
Report Ztest
DATA v_count(2) TYPE n.
DATA v_text(30).
DATA: cover_text(68) VALUE 'Text_title'..
DO 3 TIMES.
ADD 1 TO v_count.
CONCATENATE 'LIST #' v_count INTO v_text.
CONCATENATE sy-repid(8)'-' 'Spool' '-' v_count INTO cover_text.
NEW-PAGE PRINT ON
DESTINATION 'LOCAL' "<<== my printer LOCL
RECEIVER 'Z8QJY' "<<= SAP logon user
COVER TEXT cover_text "<<== Title or Spool req. name
LIST NAME v_text
LIST DATASET v_text
IMMEDIATELY ' ' " X means print now
KEEP IN SPOOL 'X' " X means keep spool
NEW LIST IDENTIFICATION 'X'
NO DIALOG .
WRITE: / v_text.
NEW-PAGE PRINT OFF.
ENDDO.
2005 May 16 8:36 PM
Bruce,
I tried your code and in SM37 I see one step with only the last spool number generated.
Thanks anyway
2005 May 16 8:46 PM
Eduardo,
You are right, from SM37 only the last spool is shown in 6.20 as well . My sincere apologies.
Bruce,
Can you please specify the steps by which you can see all the three spools?
Thanks,
Ramki.
2005 May 16 10:12 PM
Ramki,
This code used to work in version 4.5. I'm sorry I didn't check the code before I sent it. Here's some information that I found on another SAP forum.
Bruce
PostPosted: Wed Jan 05, 2005 8:40 am Post subject: Reply with quote
However, from 4.7 onwards you also need to use function module GET_PRINT_PARAMETERS because using NEW-PAGE PRINT ON to generate a spool dialogue generates a warning message.
_________________
Regards
Rich
2005 May 16 10:27 PM
Bruce,
I actually modified your code to use GET_PRINT_PARAMETERS. The 3 spools are created but when you click on the Spool button in SM37 (from Job Display as well as Step list), only the latest spool is shown.
2005 May 16 11:23 PM
Ramki,
Here's a piece of code that is currently running in our production environment, version 4.7. There are three other places in the program that have similar code. Four separate spool files are created and they are all visible in transaction SM37.
Bruce
new-page print off. "Spool off the report so far
new-page print on
destination p_dest
line-count 58
line-size 170
cover text v_cover
list name sy-repid(8)
list dataset 'OpenPayables'
immediately ' '
keep in spool 'X'
new list identification 'X'
no dialog .
Read through internal table, writing reports lines
2005 May 31 12:40 PM
Hi Bruce,
I tried your code in one of my program, but i still got only one spool request in SM37. There is only one step in the job for this program. The Sap version in my server is 4.7.
I think probably there would be some settings in ur server that would be allowing you to see multiple spool requests per job, where as the configuration at my server/client is not allowing me to see multiple spools for a one step job. Do you think so?
If you think there is configuration which does that, can you please let me know?
2009 Dec 07 10:55 PM
Hi,
I am facing the same issue. How did you solve it?
Regards,
Sandeep
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |