BARCODES
Mateusz Szwajka
Nowadays, barcodes can be found almost everywhere. We encounter them primarily when purchasing all kinds of products in stores, but their applications extend far beyond retail and cover various areas of business. Barcodes are also widely used by companies operating SAP systems, helping to streamline business processes.
Below, we will explore the possibilities of using barcodes in SAP ERP. However, before we begin, it is worth answering a fundamental question: what exactly is a barcode?
A barcode is a graphical representation of information. Originally, it consisted of a series of parallel lines (bars) of varying widths, separated by spaces of different widths. These are known as one-dimensional or linear barcodes.
Over time, two-dimensional barcodes were also developed. In addition to bars, they can represent information using rectangles, dots, and other geometric shapes.
A third category consists of three-dimensional barcodes. However, these are essentially one-dimensional barcodes that use different embossing depths to encode information.
1. EAN-13 Barcode
The set of rules defining the structure of a barcode is referred to as its symbology. Barcode symbology includes elements such as:
the method used to encode individual digits and characters,
- permitted characters,
- dimensions,
- the size of the quiet zone,
- the method used to calculate the check digit.
Examples of commonly used barcode symbologies include:
- Code 39,
- Code 128,
- EAN-8,
- EAN-13,
- UPC.
A typical process involving the use of barcodes consists of three main steps:
- printing the barcode,
- scanning the barcode,
- collecting the scanned data.
2 Process Using Barcodes
Barcodes can be printed in the SAP system, in an external system, or you can receive documents—such as invoices—with barcodes already printed on them. The second and third options will be omitted since they do not require any action on the part of the SAP system during the printing stage.
Barcode printing will be discussed based on the integration of SAP tools with Zebra printers; Zebra collaborates with SAP on the development of barcode printing solutions. Current printers use the ZPLII printer command language, which is supported by some SAP tools.
Generally, there are three common printing methods that can be used to generate barcodes:
- SAPscript - an older printing method available since the SAP R/3 system. It is worth considering, especially if most of the forms used in a given company—to which you only want to add a barcode—are created in SAPscript. The cost of migrating all forms to SmartForms may not be cost-effective in such a situation. Another example where SAPscript may be the better choice involves older printer models supplied by Zebra. These are printers that do not yet use the ZPL command language, but rather the EPL and CPCL languages. These languages are not interpreted by SmartForms, so an alternative solution must be sought. Among the drawbacks of SAPscript are the lack of a barcode print preview and, in the absence of additional tools such as ZebraDesigner™ for mySAP™ Business Suite, the time-consuming nature of barcode generation compared to SmartForms. The method for creating barcodes in SAPscript is called the Upload method. Within this method, two approaches can be distinguished:
- using external products to generate the label and the command sequence for the printer. For this method, you can use, for example, the Zebra Designer program provided by Zebra. The entire label containing the barcode is designed in this program; then, a sequence of commands for the label is generated, including data transfer, formatting, etc. The code prepared in this way is placed in SAPscript on the SAP system side, and only the variables that correspond to the information on the barcode are changed.
- ZebraDesigner™ for mySAP™ Business Suite – a special feature of ZebraDesigner that allows you to design a label within the program, then converts the label and generates a ready-to-use SAPscript in the mySAP Business Suite Internal Text Format (ITF). The SAPscript prepared in this way is ready for use in printing.
- SmartForms - this is a newer printing method, available starting with system version 4.6c, which allows you to design forms in a simpler and more intuitive way compared to SAPscript. Printing barcodes using SmartForms is called direct printing because it does not require any additional applications or print servers. A label designed in SmartForms is automatically converted into a printer language command sequence, enabling fast printing without any loss of quality. In SmartForms, you can also include special printer control codes that allow you to set additional properties, such as print density or rotating the label by 90 degrees. Unlike SAPscript, it is also possible to print a SmartForms form on a standard laser printer rather than a barcode printer. In this case, the barcode is converted into graphics rather than a list of printer control commands. This solution increases the time required for printing and also reduces the quality of the printed barcode, but it may prove useful in certain applications (e.g., printing additional A4-format shipping documents that include a barcode).
- Interactive Forms - this is a solution provided by Adobe for the SAP system. As with SmartForms, when used with Zebra printers, this involves direct printing.
Regardless of the method chosen, you must specify the appropriate printer for the final print job. For best results, the printer should be set to the correct device type. The device type determines, among other things, the assignment of the appropriate driver and code page. The choice of driver determines whether the device will be recognized as a barcode printer at all. The driver also often contains information about the resolution of the printers it supports. In Polish applications, the LZEBS2 device type is frequently used, which corresponds to Zebra printers with a resolution of 203 dpi and Unicode support.
3 Printer Type
A very important step is to define the barcode system that will be used. You can use standard barcode systems, such as BC_EAN8, BC_EAN13, C128A. You can also create your own system. In that case, depending on whether the system is to follow a new or old standard, you must define elements such as:
- symbol set,
- alignment,
- minimum/maximum number of characters.