Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member192109
Participant

One of the requirements in my project was to print Labels on Zebra printers. The labels were designed using Smartforms. For which I faced some challenges and could not find detailed solution document online explaining the way of working with Zebra printers.

So I decide to document my experiences on the way of working with Zebra printers.

Sap has provided some notes for the list of device types that can be used by Zebra. PFB some of the SAP-Note numbers for reference.

1130927 - SAP Printer Vendor Program

1100779 - Participants in the SAP Printer Vendor program

750002 - Support for Zebra label printer (ZPL2)

750772 - Information about the ZPL-II printer driver for Smart Forms.

1696511 - Problems when printing in landscape format on Zebra printers.

1173046 - Printer Vendor Wizard Note: Zebra.

This document is based on the information from the above SAP-Notes. Please note that the conclusions in this document are purely based on my experience and the documentation I came across, so if there is any scope of improvement in this document, then please add your comments where ever needed. It is necessary to have the notes as reference before you proceed any further with the document.

Note:  You can either use transaction SNOTE in SAP or the SAP market place to view the contents of the  SAP Notes. Link for SAP Market Place is

          https://websmp202.sap-ag.de/notes

The Challenges I faced during the development are:

  1. Which device type to use
  2. Orientation issues
  3. Font Issues
  4. Barcode issues (Printing and Scanning)

Points 3 & 4 are generic to every printer or device type and same approach should be followed when facing such issues.

1)  Which device type to use:

    

     The selection of the device type is based on the following 2 factors

 

  • a)      DPI resolution of the printer, and
  • b)      Orientation of the label

 

SAP-Note ‘750772’ and ‘1173046’ will help you with the selection of device type based on the DPI resolution of the printer.

Now you will have 2 device types, one each from the above 2 Notes. For example let’s assume that the printer has 203 DPI resolution, so the device types that we now have after selection are LZEB2 and YZB200.

2) Orientation issues:

Now you have to decide the orientation of the label. This is again based on the width of the paper feed on the printer. Different printers from Zebra have different widths, ask for the relevant information and then decide based on the below explanation.

Note:  Most of the Zebra printers have Continuous media, so height of the label is not a concern, only thing to take into account is the width of the paper feed on the printer.

Before I proceed further I believe you have the basic understanding of the orientations, Portrait and Landscape orientations.

Portrait Orientation:

Let’s say the width of the printer paper is 110 MM,

And the specifications for label you are designing is 170 (h) * 110 (w) as below

In this case we use device type LZEB2 only.

Landscape Orientation:

For the same printer with a paper feed of width 110 MM,

And the Specification of the label design is 110 (h) * 170 (W) as below

Here the width of the label is bigger than the actual width of the paper feed on the printer, so this requires us to go for Landscape orientation and print the document as below by rotating the label 90 degrees.

But based on the note there is no command in ZPL-II for rotating the whole output. So to achieve this there are 2 options

I.                   Using Device type LZEB2

II.                  Using Device type YZB200

Using Device type LZEB2:  According to Note 750772 it is not possible to use Landscape orientation with the device types mentioned in this note because there no command in printer language ZPL-II to rotate the whole output of the label by 90 degrees. So always use portrait only.

The work around to achieve the landscape orientation is that there is a command ‘^FWR’ in the ZPL-II printer control language that rotates each individual field by 90 degrees (clockwise). If you insert this command into the output data stream using the mechanism of command nodes in Smartform for each individual field, then we can achieve the rotation of individual fields at printout. Similarly barcode rotation can be obtained by

specifying the rotation option while creating the barcode. But first you have to use portrait orientation only in the Smartform and then design the layout accordingly in the Smartform with a command node with the rotation command for each individual field.

Below Screenshot illustrates the implementation of the above idea in Smartform.

By doing the above you can achieve the rotation of the text written in the text node ‘FROM’ but only while it is being printed on the paper not in the preview. So it is necessary that you have the concerned printer available with you to test, because this is going to take a lot of effort arranging the fonts on the label. For more information please refer to section 2 in note 750772.

Using Device type YZB200: According to note 1696511 it is possible to print in landscape orientation on zebra printers using device type YZB200, but the problem is that the print is not rotated on the printer as below

Instead it is printed like this

So using device type YZB200 it does allow us to print in landscape orientation but to get the correct output the printer paper width should not be less than the width of the label. If the width of the printer is less than the label then the label above is truncated at the end as below

So the understanding from this is that it is possible to print the labels in landscape orientation on Zebra printer, but the width of the paper feed on the printer should be same as the width of the label design else there will be truncation at the end.

So final Conclusion on which device type to use for zebra printers is:

For portrait orientation use – LZEB2

For Landscape Orientation use – YZB200 (But make sure width of the paper feed is not less than the label width)

3) Font Issues:

If you don’t use the correct font in your Smartform then you will have issues printing the label on the printer or while you are seeing a preview using the respective printer (it will work fine with the LOCL/LP01 printer).

In such cases it will give the below error message.

‘Table ‘XYZ’ does not fit into Window’

And this is mainly because, the table (template) ‘XYZ’ in some window cannot accommodate the data and the data inside this window is exceeding the size of the window or the whole page. As written above there will be no issues if you are using LOCL / LP01 device for preview, now the question here is why issues with the other devices ?  Let’s not come to a direct conclusion on this, and let’s figure this out by trials.

Now if you try and reduce the size of the template in the window (in Smartform) by half of it then you can see the preview but you will see bigger size letters and may be a different font. That is because the printer does not support the font you have used in the Smartform and by default SAP takes the default font of the printer and uses that in the Smartform and hence you see a bigger font size and possibly a different font style.

So it is advisable to use fonts that are available for the device type associated with the printer.

You can check the printer fonts by using transaction SE73.

Steps to check the printer fonts:

Go to SE73.

Select printer fonts radio button and click display. It will take you to the next screen where all the SAP defined device types and custom device types (newly created or loaded) in SAP are listed.

Select your device type and double click to see the list of fonts available for that device type.

So in this case only Helve is maintained, so it is better to use Helve only in your Smartform, One more thing to know here is no matter what you have in Smartform the print will always have BOLD text only because of the bold settings in the printer font( see screenshot above).

It can have different font Sizes though, I did not have to maintain different sizes in the printer fonts but the labels were printed with their corresponding size.

If your requirement is to have a specific font then you can add that Font to the printer device type and this will be a Basis activity.

4) Barcode issues (Printing and Scanning):

First thing to know about barcodes is that the preview and the actual print from the printer are not the same. So try to adjust your layout based on the printout form the printer and not based on the preview.

Let me show you what I actually meant by this.

Preview in SAP:

Actual printout from the printer:

Both the screenshots above were created using the same barcode CD39__00 barcode, and symbology Code39 but the barcodes in the preview and the actual print are totally different and that is the reason why it is advised to design the layout based on the actual printout from the printer.

The second thing to know about barcodes in SAP is that there are only a few barcode symbologies that are supported by SAP and are available in system by default.

The barcode symbologies supported by SAP are:

These are the basic barcodes types using which we can create a barcode. And SAP has provided few barcodes using these and these are also available in SAP by default.

Both printer barcodes and System barcodes can be checked in transaction SE73 (see below).

Display system barcodes to see the list of barcodes supported by SAP (see below).

The screenshot above shows few of the default barcodes supported by SAP. The barcode highlighted in the above screen was created using the new barcode technology and the others are created using conventional technology. You can also create your own barcodes here. More information regarding how to create barcodes in SAP can be found online.

The next step with barcodes is to check which barcodes are supported by the printer. Let’s assume that your requirement is to use a barcode of symbology Code_39 so first check if the printer has any default barcodes with this symbology.

To check printer barcodes, go to SE73 and display printer barcodes and go to printer LZEB2 and double click to list all barcodes supported by printer device type.

Basically these are standard barcodes that are also supported by SAP. The highlighted ones in the screenshot above use Code_39 symbology. Try using one of these in your layout and see if it meets your requirements and make sure you design the layout based on the actual print form the printer not based on the preview of the Smartform.

Using the barcodes supported by the printer will ensure that they are easily scanable and read by the scanner. If you use any other system barcode which is not supported by the printer then also you will get the barcode printed on the label but we will have issues scanning the barcode. So it is better to stick to using the barcodes provided by the printer.

If listed barcodes does not meet your requirement (may be because you need a barcode with less width or height to accommodate on your label) then you have to create a new system barcode and assign it to the printer device.

This part is dealt in more detail in the document named How to Print Barcodes that are not supported by SAP using Smartforms that is already published.

Apart from this you can also have alignment issues with the barcodes. To align a barcode you can do the following.

  • Go to Smartstyle you have used in the program, select the respective node you have assigned for the barcode. Here try changing the alignment and spacing values and try giving it a few trials. You will be able to align barcodes after a few combinations.

       

  • Sometimes if there is not enough space in the column of a template or the table cell then the barcode placed inside them will skip one line and print the barcode in second line. To align the barcode properly with the other barcodes in the adjacent columns you can either increase the size of that column to accommodate the barcode or if that is not possible then reduce the sizes of the other adjacent columns so that the other columns also skip a line. An example for this issue is as below.

       

In the above screenshot there is an alignment issue with the barcodes but there is no space on the page to increase the size of the 2nd column, to align them we have to reduce the size of the 3rd and 4th columns by adding an empty column, either one empty column each after the 3rd and 4th columns or reduce the size of 3rd and 4th columns a little bit (very nominal) and add an extra column just before the third as shown in the below screen shot.

This will make the barcode shift to the next line in 3rd and 4th columns also. So this will align the barcodes properly as shown in the below screenshot.

                                                                                                                             ----- ' THE END ' ------

The conclusions in this document are purely based on my experience and the documentation I came across online, so if there is any scope of improvement in this document, then please add your comments where ever needed.

32 Comments
Labels in this area