Skip to Content

In fact, in my company, we decide to use sapsprint in order to manage printer.

But as it is not a logical oms, we can’t have a feed back a status in sap. The sataus given in SAP just tell you if SAPSRINT get information about the printout.

It doesn’t tell you if the form is correctly print.

So we need to to check and monitore SAPSPRINT log and check the windows spool printer in order to see if there is some trouble.

That’s why i have written a powershell script to do that.

This script generate an html page.

 

The first part give printer on which we have probably some error  and give for each printer the number of waiting job in the queue:

/wp-content/uploads/2014/11/printer_583468.png

 

The second part gives by default all spool status for the lastest day by SAP sid:

 

/wp-content/uploads/2014/11/spool_583469.png

First column : SAP sid

Second coloumn: SAP spool number.

Third column : Priner name.

Fourth column : Printer status.

Fifth column : Timsestamp on the SAPSPRINT LOG  on which SAPSPRINT give it to windows spool server.

Sixth column : SAPSPRINT status according to what we have on SAPSPRINT LOG.

Seventh column: Status in windows spool server. I have a look on the current spool queue of the printer. If spool is not present, it means either spool is ok either some one remove it, so STAUTS is OK.If it is present, it give the status in the Queue.

 

The script can be launch without parameter : so it gives you all spool of the lastest day.

But it could be launch to get more days with parameter “-days <nb days back>” :

example :

 

PS C:\Windows\system32> C:\Users\AJ0242224\scripts\Get_status.ps1  -days 2

Such commands gives you the 2 lastest days of spool.

 

it could be launch to get only for one SAP instance with parameter “-SID <SAPSID>”

Example :

PS C:\Windows\system32> C:\Users\AJ0242224\scripts\Get_status.ps1  -SID P8B

Such commands gives you the lastest days of P8B spool.

 

It could be launch to get information for you precise spool number with parameter “-SPNB <spool number>”:

Example :

PS C:\Windows\system32> C:\Users\AJ0242224\scripts\Get_status.ps1  -SPNB 85744

Such commands gives you the status of the spool 85744.

 

Al this option could be mixed :

Example:

PS C:\Windows\system32> C:\Users\AJ0242224\scripts\Get_status.ps1  -days 2 -SID P8B

Such commands gives you the 2 lastest days of spool for P8B instance on this sapsprint server.

 

 

The script is here :https://github.com/mathieugravil/mathieugravil-coding/tree/master/Powershell/SAPSPRINT

. You can use it if you want. Enjoy!!

To report this post you need to login first.

4 Comments

You must be Logged on to comment or reply to a post.

      1. Neelam Manian

        Hi Mathieu

         

        I just came across this blog. Very interesting and would like to implement this on our systems. However am not able to find the attachment, is it possible for you to share again please.

         

        Thanks

        Neelam

         

        (0) 

Leave a Reply