Application Development 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: 

How can I send a abap report to spool?

Former Member
0 Kudos

Hi everybody:

Can anybody tell me how can I send a ABAP report to spool(using FM or instruction)?

Thanks in advance.

Javier.

1 ACCEPTED SOLUTION

former_member188685
Active Contributor
0 Kudos

Hi,

it can be done using the following steps..

this will give popup, there you can specify the parameters.spool will be generated.

  CALL FUNCTION 'GET_PRINT_PARAMETERS'
       EXPORTING
         IMMEDIATELY                  = 'X'
         LINE_SIZE                    = 220 
         RELEASE                      = 'X'
         MODE                         = 'CURRENT'
         NO_DIALOG                    = ' '
       IMPORTING
*     OUT_ARCHIVE_PARAMETERS       =
         OUT_PARAMETERS               = L_PARAMS
         VALID                        = L_VALID
       EXCEPTIONS
         ARCHIVE_INFO_NOT_FOUND       = 1
         INVALID_PRINT_PARAMS         = 2
         INVALID_ARCHIVE_PARAMS       = 3
         OTHERS                       = 4.

      NEW-PAGE PRINT ON   PARAMETERS L_PARAMS NO DIALOG.

      PERFORM SELECT_DATA.
      PERFORM DISPLAY_DATA. "report , write statements
      NEW-PAGE PRINT OFF.

regards

vijay

7 REPLIES 7

Former Member
0 Kudos

Hi Javier,

If u run ur report in background it will send output to spool.

Thanks & Regards,

Ankur

0 Kudos

Thank for your reply.

I don't refere to background. I want print the report each time that It is executed.

Thank you so much.

Javier.

0 Kudos

Hi Javier,

You have print icon the the tool bar.You can print through that.It will prompt you for the printer.If you click properties,you can change the print setting for printing immediately or moving it to spool or print later.

Do you want this way or do you want to write a program for that.

former_member188685
Active Contributor
0 Kudos

Hi,

it can be done using the following steps..

this will give popup, there you can specify the parameters.spool will be generated.

  CALL FUNCTION 'GET_PRINT_PARAMETERS'
       EXPORTING
         IMMEDIATELY                  = 'X'
         LINE_SIZE                    = 220 
         RELEASE                      = 'X'
         MODE                         = 'CURRENT'
         NO_DIALOG                    = ' '
       IMPORTING
*     OUT_ARCHIVE_PARAMETERS       =
         OUT_PARAMETERS               = L_PARAMS
         VALID                        = L_VALID
       EXCEPTIONS
         ARCHIVE_INFO_NOT_FOUND       = 1
         INVALID_PRINT_PARAMS         = 2
         INVALID_ARCHIVE_PARAMS       = 3
         OTHERS                       = 4.

      NEW-PAGE PRINT ON   PARAMETERS L_PARAMS NO DIALOG.

      PERFORM SELECT_DATA.
      PERFORM DISPLAY_DATA. "report , write statements
      NEW-PAGE PRINT OFF.

regards

vijay

Former Member
0 Kudos

use FM 'GET_PRINT_PARAMETERS'

Former Member
0 Kudos

hi,

from the list goto LIST->PRINT.

this way you can print your report output.

regards

srikanth

Former Member
0 Kudos

Hi ,

To initiate a new spool request used command new-page

data : c_dest(4) value 'ZJ00', " printername

c_immediately(1) value 'X'.

new-page print on destination c_dest

immediately c_immediately

keep in spool 'X'

line-count '68'

line-size '130'

new-section

no-dialog.

Hope this helps.

Regards,

Sudheer