‎2006 Sep 05 3:24 PM
hi experts,
after using get_print_parameters
how to send my report to spoll .
how can i give spool request.
reards,
siri.
‎2006 Sep 05 4:35 PM
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.
‎2006 Sep 05 3:27 PM
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
‎2006 Sep 05 4:35 PM
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.