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

Report to spool

Former Member
0 Likes
789

Hi SAP gurus. I'm trying to make a code that would display my report into the spool and get the spool number but I'm not sure on how to do this. An example code or a pseudo code would be very much appreciated. Please help. Thanks in advance.

Hi SAP gurus. I'm trying to make a code that would display my report into the spool and get the spool number but I'm not sure on how to do this. An example code or a pseudo code would be very much appreciated. Please help. Thanks in advance.

6 REPLIES 6
Read only

Former Member
0 Likes
756

Hi just look in the example

DEMO_LIST_SUBMIT_TO_SPOOL

this will help u.

regds

gv

Read only

0 Likes
756

Hi Venkat,

Thank you for yor reply. I did look at the code but I'm not sure on how to do this when using alv reports. DEMO_LIST_SUBMIT_TO_SPOOL puts a simple report into the spool. Is there a way for me to do this using alv reports?

Read only

Former Member
0 Likes
756

hi, you can do as following process:

1. CALL FUNCTION 'GET_PRINT_PARAMETERS', i/p DESTINATION with 'LOCL'.

2. NEW-PAGE PRINT ON

3. write the report, just like you do in the normal report

4. NEW-PAGE PRINT OFF

5. select TSP01, get the MAX RQIDENT from it, it is the spool number you need.

Hope it will be helpful

thanks

Read only

0 Likes
756

Hi Zhenglin,

Thanks for your reply. Could I do this wityhout displaying the spool dynpro/Print settings screen?

Read only

Former Member
0 Likes
756

Hi,

To give you a clearer view of what I wanted to do here's a summary of the steps:

1. get data from tables

2. put alv into spool (alv has subtotals)

3. get the spool number

4. display the same alv in item#2 into the screen with the spool number in the header

Please help. Thanks in advance.

Read only

Former Member
0 Likes
756

hi, 'Could I do this wityhout displaying the spool dynpro/Print settings screen?'

yeah, you can set a i/p NO_DIALOG = 'X'.

For the ALV into spool, I remember that you can print the ALV in backgroud, then you can get them in the spool.

Do a search in the former topic.

Thanks a lot