cancel
Showing results for 
Search instead for 
Did you mean: 

Adding staple to sets within spool

michael_vollmer2
Explorer
0 Kudos

I am printing 5 different smartforms in a single spool. Some of the forms are multiple pages. How do you send staple command for forms that are multipage, but in the same spool file as forms that are single page.

When I set the printer initialization to staple for a format, then entire spool output get staples together

Thanks,

Mike Vollmer

Accepted Solutions (0)

Answers (3)

Answers (3)

michael_vollmer2
Explorer
0 Kudos

OK.. Separate spool jobs will not work, as we need to guarantee the sequentiality of the print jobs. This is why we are inserting them into a single spool file.

The printed output must be in order, and we can not chance another print job getting inserted. Which is possible because we have several users printing runs at the same time. Each run can have 10-30 forms which must come up sequentially as a package.

I guess the main question is can we send staple commands with a spool file so each form gets stapled, and not the entire spool file. (which is what is happening now.)

brad_bohn
Active Contributor
0 Kudos

As Sandra said, I don't think you can do it that way. The print controls that I've seen don't have any sort of 'tracking' mechanism, i.e., 'this is where I want to start stapling', 'this is where I want to stop stapling', then 'staple' though I haven't worked with these controls recently.

Though it's not ideal, I think you can still achieve your goal with multiple spools. You need another logical queue, i.e., SAP printer device, which is held in Windows (or whatever your OS is). When you are ready to print these spools, hold your other OS-level print queues and release the 'special staple queue'. The documents will print in the order in which they are queue'd.

michael_vollmer2
Explorer
0 Kudos

Not sure if separate queue will work, as these print jobs are happening all night long.

Let me ask the question differently.

We print 200 runs each night. Each "Run" consists of many spool jobs. WHen the user triggers a run job, all the spool files associated with that "Run" must print in a specific order. THe problem is that another user may also trigger a second, or third, "Run" at the same time.

I can't have the spool files from the different "Runs" commingling. Hence, we were trying to append each spool for a single run into one spool file.

Any ideas?

Sandra_Rossi
Active Contributor
0 Kudos

I think that you have reached the limits of controlling outputs by SAP!

If the printer is reserved to this kind of printout (packages), you may create a program which will run as a background job periodically. It is the only one allowed to release (print immediately) the spools.

The users print spools but they are held instead of being sent to printer, an event is sent to the background program which then print immediately these spools. So you are sure of the sequence (and stapling is possible because you have separate spools).

[Note 118057 - Flexible Configuration of the Spool Service|http://service.sap.com/sap/support/notes/118057] may help you, it contains very detailed information

michael_vollmer2
Explorer
0 Kudos

Thank you.. WE are still trying to figure a way through this.

I have a new question...

Can I send Staple commands when printing ABAP lists (ALV's)?

Sandra_Rossi
Active Contributor
0 Kudos

The easiest is to enter the stapling printer command in the Printer Initialization action of list format type (X_65_80 for example), defined at device type level (SPAD). You may also use print controls of course.

michael_vollmer2
Explorer
0 Kudos

I am using a Canon 7095 DEvice type (ZCN5870+) which has the following in the Printer Init file:

BUt the Staple command does not seem to be passed.

According to the Canon documentation, The device option setting do not work with ABAP list printing using a PCL device type because of the SAP printing structure.

  1. enter PJL mode and switch to PCL language

\e%-12345X@PJL\r\n

#=================

  1. Support Devices

  2. iRC 5870/7086

#=================

  1. Staple

#=================

  1. Upper left in Portrait and Upper Right in Landscape(default)

@PJL COMMENT CANPJL SET STAPLE = ONEUPLEFT\r\n

  1. Upper right in Portrait and Lower Right in Landscape

#@PJL COMMENT CANPJL SET STAPLE = ONEUPRIGHT\r\n

  1. Lower left in Portrait and Upper Left in Landscape

#@PJL COMMENT CANPJL SET STAPLE = ONELOWLEFT\r\n

  1. Lower right in Portrait and Lower Left in Landscape

#@PJL COMMENT CANPJL SET STAPLE = ONELOWRIGHT\r\n

  1. Two left in Portrait and Two Top in Landscape

#@PJL COMMENT CANPJL SET STAPLE = TWOLEFT\r\n

  1. Two right in Portrait and Two bottom in Landscape

#@PJL COMMENT CANPJL SET STAPLE = TWORIGHT\r\n

Sandra_Rossi
Active Contributor
0 Kudos

If they say so... Well, I don't know if you want to keep on investigating or not?

You may have a look at the print stream which arrives at the printer (otherwise we can't be sure why the command is ignored) by tracing the output device (either in the log or by using "retain print file", revert back immediately so that to not forget). You'd then be able to see why it doesn't work (you may even directly try to update the file and send it directly to the printer, using OS commands of course), and maybe find a workaround...

michael_vollmer2
Explorer
0 Kudos

How would I use the the Print Controls. I am not familiar with that.

Sandra_Rossi
Active Contributor
0 Kudos

My answer was a little bit too fast about print controls as you mentioned it was an ALV. It might be rather complex to insert your print control inside it as this list is not generated by your custom program (ALV prints the list in its own list level).

Maybe it will work if you use it in a callback routine of the ALV...

You use abap statement PRINT-CONTROL FUNCTION 'Z0001' to print Z0001 custom print control. You define the print control at device type level (for all device types that you want to take it into account) and enter the corresponding printer command (in printer language).

michael_vollmer2
Explorer
0 Kudos

So just to confirm, the consensus is that SAP does not support Stapling inside of a spool request.for Smartforms (i.e. page 1, page 2, Staple Page 3 & 4 & 5, Page 6, etc..)

Can we create a single spool file and programmatically add in the PCL or PJL codes for Staple between the sets within the Spool?

Sandra_Rossi
Active Contributor
0 Kudos

In fact, SAP just doesn't support stapling as it is printer-dependent (SAP can't be sure how printers will handle the commands sent). But you can still use these SAP functions, and it might work for your own printer.

About sending PJL commands at the beginning of each page, can you STAPLE OFF? In fact, I didn't think it was possible before now, but if yes, that's worth doing a test (and I don't see why it wouldn't work!) Don't forget to switch to PCL back after the PJL command

michael_vollmer2
Explorer
0 Kudos

ABAP developers are working on this now, will let you know if it is successful.

Former Member
0 Kudos

Hi,

Can you please let us know if this option is possible know? STAPLE OFF for OCE PRINTER;

Thank you véry much for your help

Abdo ABI-ATMI

Former Member
0 Kudos

Add a space in command line before adding \r\n

@PJL COMMENT CANPJL SET STAPLE = ONEUPLEFT\r\n


should be


@PJL COMMENT CANPJL SET STAPLE = ONEUPLEFT \r\n


Worked for me on canon 5235i.

former_member156446
Active Contributor
0 Kudos

[staple within SAP [RESOLVED]|http://www.sapfans.com/forums/viewtopic.php?f=14&t=242498]

bruno_esperanca
Contributor
0 Kudos

Thanks for this, Jay Ray.

Sandra_Rossi
Active Contributor
0 Kudos

I would be very surprised if it was possible: the spool is the most little element on which applying printer "physical" commands. For example, if you print a Word document, you can't staple only part of the pages. Did you already see that working?

Instead, create different spools (that would be the best solution) or create output requests with a page range.