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: 

spool request

Former Member
0 Kudos
79

hi experts,

after using get_print_parameters

how to send my report to spoll .

how can i give spool request.

reards,

siri.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
42

If you are running in forground, then you need to enclose the write/uline/skip etc statements inside the statements NEW-PAGE PRINT ON and NEW-PAGE PRINT OFF.

2 REPLIES 2

Former Member
0 Kudos
42

Hi Sireesha,

If you are running in background ...

you can do it this way...

METHOD GET_JOB_DETAILS.

  • Get current job details

CALL FUNCTION 'GET_JOB_RUNTIME_INFO'

IMPORTING

EVENTID = GD_EVENTID

EVENTPARM = GD_EVENTPARM

EXTERNAL_PROGRAM_ACTIVE = GD_EXTERNAL_PROGRAM_ACTIVE

JOBCOUNT = GD_JOBCOUNT

JOBNAME = GD_JOBNAME

STEPCOUNT = GD_STEPCOUNT

EXCEPTIONS

NO_RUNTIME_INFO = 1

OTHERS = 2.

ENDMETHOD.

METHOD OBTAIN_SPOOL_ID.

CHECK NOT ( GD_JOBNAME IS INITIAL ).

CHECK NOT ( GD_JOBCOUNT IS INITIAL ).

SELECT * FROM TBTCP

INTO TABLE IT_TBTCP

WHERE JOBNAME = GD_JOBNAME

AND JOBCOUNT = GD_JOBCOUNT

AND STEPCOUNT = GD_STEPCOUNT

AND LISTIDENT <> '0000000000'

AND PDEST = 'LOCL'

ORDER BY JOBNAME

JOBCOUNT

STEPCOUNT.

READ TABLE IT_TBTCP INTO WA_TBTCP INDEX 1.

IF SY-SUBRC = 0.

MESSAGE S004(ZDD) WITH GD_SPOOL_NR.

GD_SPOOL_NR = WA_TBTCP-LISTIDENT.

MESSAGE S004(ZDD) WITH GD_SPOOL_NR.

ELSE.

MESSAGE S005(ZDD).

ENDIF.

ENDMETHOD.

if you are using get_print_parameters..

Without archiving

DATA: PARAMS LIKE PRI_PARAMS,

DAYS(1) TYPE N VALUE 2,

COUNT(3) TYPE N VALUE 1,

VALID TYPE C.

CALL FUNCTION 'GET_PRINT_PARAMETERS'

EXPORTING DESTINATION = 'LT50'

COPIES = COUNT

LIST_NAME = 'TEST'

LIST_TEXT = 'SUBMIT ... TO SAP-SPOOL'

IMMEDIATELY = 'X'

RELEASE = 'X'

NEW_LIST_ID = 'X'

EXPIRATION = DAYS

LINE_SIZE = 79

LINE_COUNT = 23

LAYOUT = 'X_PAPER'

SAP_COVER_PAGE = 'X'

COVER_PAGE = 'X'

RECEIVER = 'SAP*'

DEPARTMENT = 'System'

NO_DIALOG = ' '

IMPORTING OUT_PARAMETERS = PARAMS

VALID = VALID.

IF VALID <> SPACE.

SUBMIT RSTEST00 TO SAP-SPOOL

SPOOL PARAMETERS PARAMS

WITHOUT SPOOL DYNPRO.

ENDIF.

check the link http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/submit_t.htm

regards,

vidya.

Message was edited by: Vidya Chowdhary

Former Member
0 Kudos
43

If you are running in forground, then you need to enclose the write/uline/skip etc statements inside the statements NEW-PAGE PRINT ON and NEW-PAGE PRINT OFF.