Banner

Attention: open in a new window. PDFPrintE-mail

2009
03
May

Keep Printer Status 'Alive'

If you have a mixed platform - UNIX SAP instance and NT network - you know about problems printing from your SAP instance to your NT network. The link between the two sometimes dies, they no longer talk.

I write this little ABAP program to keep that connection alive and well - it reads all the printers found in tsp03d and "touches" them to keep them awake and ready for action. You can run the program with a X parameters so you can see the printers being "touched" if you run the program from a dialog process. Or you can schedule the program without a parameter to run as a job every 15 minutes. No parameter means no output.

----------------------------------Start of ABAP code----------------------------

REPORT ZBC_REACTIVATE_PRINTERS .

tables: tsp03d .
data: answer .
parameters: list like tsp03d-pasync.

SELECT * FROM TSP03D
ORDER BY PADEST.

call function 'RSPO_DEVICE_CHECK_HOSTSPOOL'
exporting
name = TSP03D-NAME
importing
reachable = answer
exceptions
name_missing = 1
name_twice = 2
not_found = 3
call_error = 4
others = 5.

If list = 'X'.
WRITE AT / TSP03D-NAME.
WRITE AT 40: 'Printer Has Been Reset'.
endif.

ENDSELECT.
-----------------------------------End of ABAP code-----------------------------
Last Updated (Tuesday, 30 November 1999 00:00)