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: 

Sending Prescribe print controls via SWINCF

TMNielsen
Contributor
0 Kudos

Hi

We are installing new Kyocera printers and we have a few important issues that we can solve, but not at the same time. We print sapscript and smartforms.

On one hand we need unicode print and we can have that if we use device type SWINCF and SAPSPrint.

on the other hand we have various requirements that requires use of print controls. For example we need to be able to control what output tray the print is delivered in. We kan have this if we send Kyocera Prescribe commands to the printer, but it only works if we use a printer specific device type. It works with Kyocera an HP device types, but we cannot make it work with SWINCF.

I think the key to solving the issues is to find a solution to pass Kyocera Prescribe commands to the printer defined with SWINCF.

We have already tried with various combinations of the flags in the print control, but so far no result. The print controls that works with the printer specific device type is like this:

In SAP spool hex view, we can see the print control in the right place, but when we look at the spool file on the printer server (windows), it seems that the prescribe command is send AFTER the actual the print instead of before the print.

1 ACCEPTED SOLUTION

Private_Member_7726
Active Contributor
0 Kudos

A word of warning on UPE - there are quite recent OSS Notes with bug fixes for the solution...

Yes, I just read in some Kyocera Prescribe manual that: "The OTRY command should be placed at the top of a file or program" - whatever that means...

It doesn't help you in any way, but I dread the thought of having device dependent print controls in the forms themselves... If it's something simple - just one command per form (no output tray switches within the form), I'd be programming "output module" that takes in OTF, inserts the OTF commands for print control directly into OTF stream at whatever position they are needed, then calls SAP standard OTF printing... Granted, all existing "driver programs" would need to be retrofited with "get the OTF "and call "output module" logic...

For test purposes, if you are familiar with device type maintenance in SPAD, you could try to copy the HP PCL device type into Z namespace and try to place the Prescribe command directly in "Printer Initialisation" part for DINA4 Page Format (or whicever Page Format is uesd) - so it comes "at the top of a file".

cheers

Janis

Message was edited by: Jānis B

7 REPLIES 7

TMNielsen
Contributor
0 Kudos

Actually I have same problem with PCL commands for HP printers using SWINCF, but not for HP printers using a HP device type lige HPLJ4.

I seems that when the HPLJ4 device type is used with a HP printer, the complete print file is scanned for PCL commands before the output tray is selected, but if I use the same device type with the PCL compatible KYOCERA printer, the output tray command (PCL or prescribe) only works if it is placed near the start of the print file.

Can anyone comment on or explain this observation?

0 Kudos

Hi,

Has Kyocera at least officially documented this kind of scenarios as supported somwhere - mixing PCL and Prescribe or Windows and Prescribe printer command language commands in one print job..? I find it hard to believe, but then I have no experience with Kyocera...

Do you have access to technical reference manual (PCL) for Kyocera printer(s) in question; if yes, what does it say about controlling output trays via PCL commands..?

Also, when you say "Unicode print", do you mean working within the solution mentioned in 1812076 - Unicode Printing Enhancement (UPE) (more here: Or do you mean working without this solution?


cheers,

Janis

Message was edited by: Jānis B

0 Kudos

I am not an KYOCERA expert, but to my understanding the printers can process Prescribe commands in PCL mode or in any other mode.

Anyway with a HPLJ4 device type it works with both Precribe and PCL in some scenarios. The important thing seems to be if the command is near the start of the output request, and I think that this may also be the problem with SWINCF.

The history is that we have some old SAPscripts sending a print control for output tray in a non-main window. As you may know SAP script process lines in the main window until the main window of one page is full, then it process all the other windows of that page, before it continues with the main window on the next page.

With this scenario a lot of data is printed before the output tray print control is fired.

We also have some SAP Smartforms build in a similar way, but by Smartforms the processing is a little different, because the windows are processed in the sequence they are defined in the Smartforms editor. We have placed the window with the print control as the first window and so the prescribe or PCL command linked to the print control is placed near the start of the output request.

With output device HPLJ4 and Smartforms the output tray selection works on both HP and KYOCERA printers.

With output device HPLJ4 and sapscript the output tray selection works only on HP printers.

With SWINCF the tray selection doesn't work on any HP or KYOCERA printers.

0 Kudos

and to clarify what I mean by unicode print.

Our unicode solution is build with SWINCF, SAPSPrint, cascading fonts,....

I am not familiar with UPE, but it could very well be at least part of the solution. At least it seems to open a posibility to print unicode without SWINCF. This option did not exist when we implemented the unicode solution.

0 Kudos

I have happily forgoten most of my SAPScript, so probably this is stupid... but, assuming there is just one Print-Control per form necessary, what about FM CONTROL_FORM - would the "driver programs" perhaps have enough control over opening and starting the forms to issue PRINT-CONTROL via FM call, before "other output" is processed..? Right after START_FORM call?

It would also place the device dependent stuff kind of outside form, in the "driver program"...

cheers

Janis

Private_Member_7726
Active Contributor
0 Kudos

A word of warning on UPE - there are quite recent OSS Notes with bug fixes for the solution...

Yes, I just read in some Kyocera Prescribe manual that: "The OTRY command should be placed at the top of a file or program" - whatever that means...

It doesn't help you in any way, but I dread the thought of having device dependent print controls in the forms themselves... If it's something simple - just one command per form (no output tray switches within the form), I'd be programming "output module" that takes in OTF, inserts the OTF commands for print control directly into OTF stream at whatever position they are needed, then calls SAP standard OTF printing... Granted, all existing "driver programs" would need to be retrofited with "get the OTF "and call "output module" logic...

For test purposes, if you are familiar with device type maintenance in SPAD, you could try to copy the HP PCL device type into Z namespace and try to place the Prescribe command directly in "Printer Initialisation" part for DINA4 Page Format (or whicever Page Format is uesd) - so it comes "at the top of a file".

cheers

Janis

Message was edited by: Jānis B

0 Kudos

Hi Jānis

Thanks - you have a lot of good ideas. I will for sure test some of them.

Best regards