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: 

need to send report output to spool

Former Member
0 Kudos
515

HI,

I dont need to run the report in background.....But i need to get the output in spool ... is there any function module.....give me some sample coding....

rgds

Saravana

2 REPLIES 2

Former Member
0 Kudos
72

The easiest way of printing a list while creating it, is for the user to choose Execute + print on the report's selection screen. The user can choose between displaying the list on the screen (choosing Execute) or printing it directly without displaying it (choosing Execute + print).

use this function module SET_PRINT_PARAMETERS' to send a report directly to spool.

sample program.

REPORT SAPMZTST NO STANDARD PAGE HEADING LINE-COUNT 0(2).

PARAMETERS P TYPE I.

INITIALIZATION.

CALL FUNCTION 'SET_PRINT_PARAMETERS'

EXPORTING

ARCHIVE_MODE = '3'

COPIES = '5'

DEPARTMENT = 'BASIS'

DESTINATION = 'LT50'

EXPIRATION = ' '

IMMEDIATELY = 'X'

LAYOUT = 'X_65_132'

LINE_COUNT = 54

LINE_SIZE = 20

LIST_NAME = 'Test'

LIST_TEXT = 'Test for User''s Guide'

NEW_LIST_ID = 'X'

RECEIVER = 'KELLERH'

RELEASE = ' '

SAP_COVER_PAGE = 'X'.

START-OF-SELECTION.

DO P TIMES.

WRITE / SY-INDEX.

ENDDO.

TOP-OF-PAGE.

WRITE: 'Page', SY-PAGNO.

ULINE.

END-OF-PAGE.

ULINE.

WRITE: 'End of', SY-PAGNO.[/code]

or

Printing Lists

You can send a list from a called program directly to the spool system instead of displaying it on the screen. To do this, use the TO SAP-SPOOL addition in the SUBMIT statement:

SUBMIT... TO SAP-SPOOL print-parameters.

follow this link for more information.

http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dba54635c111d1829f0000e829fbfe/content.htm

Former Member
0 Kudos
72

Hi,

Please don't open multiple threads on the same issue.

Check this good blog on the same... may be useful for you.......

/people/prashant.patil12/blog/2007/02/20/displaying-alv-grid-in-background-job