Mateusz Szwajka

Nowadays, barcodes can be found everywhere. We come into contact with them primarily when buying all kinds of products in stores, but their applications are much wider and cover various branches of business. They are also present in many companies using the SAP system and help to improve business processes. The possibilities of using barcodes in the SAP ERP system will be presented below, but at the beginning, it is necessary to answer the question: what is a barcode anyway?

A barcode, also known as a bar code, is a graphical representation of information. Originally it was represented by a series of parallel lines - stripes of variable width, between which there were also gaps of variable width. These codes are called one-dimensional or line codes. Later, two-dimensional codes were also created, in which, in addition to stripes, you can meet the presentation of information using rectangles, dots, or other geometric figures. Three-dimensional codes can be indicated as the third group, but they are basically one-dimensional codes with different embossing depths.


1 EAN 13 Code,

The set of rules describing the structure of the code is called a symbology. The symbolism consists of such elements as:

  • coding of individual digits and characters,
  • characters allowed,
  • dimensions
  • the size of the quiet zone,
  • the method of calculating the checksum.

Examples of popular symbols are:

  • Code 39,
  • Code 128,
  • EAN-8 code,
  • EAN 13 Code,
  • UPC.

A typical barcode process involves three basic aspects:

  • barcode printing,
  • barcode reading,
  • collection of read data.

2 The process that uses barcodes

The barcode can be printed in the SAP system, an external system, or you can receive documents, e.g. invoices with already printed barcodes. The second and third options will be omitted as it does not need any work on the SAP system side at the printout stage.

Barcode printing will be discussed based on the combination of tools on the side of the SAP system with Zebra printers, which cooperates with SAP in the development of barcode printing solutions. Current printers use the -ZPLII printer commands programming language, which is supported by some of the SAP tools.
Generally, three most common printing methods can be used to generate barcodes:


  • SAPscript - an older printing method, available from the SAP R / 3 system version. It is worth considering especially if most of the forms that are used in a given company, and to which you only want to attach a barcode, are created in SAPscript. The cost of migrating all forms to SmartForms can be unprofitable in this situation. Another example of when you need to choose SAPscript can be older types of printers supplied by Zebra. These are printers that have not yet used the ZPL command language, but the EPL and CPCL languages. These languages are not interpreted by SmartForms, therefore a different solution must be found. The disadvantages of SAPscript include the lack of barcode printout preview and the lack of additional tools, such as ZebraDesigner ™ for mySAP ™ Business Suite, time-consuming barcode generation compared to SmartForms. The method for creating barcodes in SAPscript is called the Upload method. It can be divided into two approaches:
  • using external products to generate a label and a sequence of printer control commands. For this method, you can use e.g. the Zebra Designer program provided by Zebra. The entire label containing the barcode is designed in this program, then a sequence of commands/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 are to correspond to the information on the barcode are changed.
  • ZebraDesigner ™ for mySAP ™ Business Suite - a special ZebraDesigner functionality that allows you to develop a label inside the program, and then convert the label and generate a ready SAPscript from it in mySAP Business Suite Internal Text Format (ITF).SAPscript prepared in this way is ready to use for printouts.
  • SmartForms - this is a newer method of printing, available from the system version 4.6c, which allows for an easier and more intuitive way, compared to SAPscript, to design forms. Barcode printing via SmartForms is called direct printing because it does not need any additional applications or print servers. The label designed in SmartForms is automatically converted into a string of printer language commands, which enables quick printing and without loss of quality. In SmartForms, you can also place special printer control codes, which will allow you to set additional properties, such as print density or rotation of the label by 90 degrees. Unlike SAPscript, it is also possible to print a SmartForms form on a regular laser printer rather than a barcode printer. In this case, the barcode is converted into a graphic, not a list of printer control commands. It is a solution that extends the working time needed for printing, as well as deteriorating the quality of the printed barcode, but in some applications, it may be useful (e.g. printing additional documents for A4 transport with the barcode on it).
  • Interactive Forms - this is a solution provided by Adobe for the SAP system. As with SmartForms, in conjunction with Zebra printers, we deal here with direct printing.

Regardless of the chosen method, the appropriate printer on which the printout is made should be indicated at the target printing. For best results, the printer should have the appropriate device type selected. The device type includes, among other things, the assignment of the appropriate driver and code page. The choice of the driver will decide whether the device will be considered a barcode printer at all. The driver often contains information about the resolution of the printers it supports. In Polish applications, the LZEBS2 device is often used, which corresponds to Zebra printers with a resolution of 203 dpi and active Unicode.


3 Printer type

A very important step is to define the barcode system that will be used. Standard code systems can be used, e.g. BC_EAN8, BC_EAN13, C128A. You can also use the option to create your system. Then, depending on whether the system is a new standard or an old one, define such elements as, for example:

  • symbolism,
  • equalization,
  • minimum / maximum number of characters.

4 Bar code systems

Once you have determined which bar code system will be used, you can proceed to the step where a specific character format is already defined. In a character format, you can decide that the format is a barcode and assign a specific barcode system to it. A character format defined in this way can be used in forms to obtain an appropriate representation of the information sent (e.g. material number) on the printout in the form of a barcode.


5 Defining the character format

The above aspects concerned the printout from the software side, but one should also pay attention to the hardware aspect. An important factor when planning barcode label prints is the choice of printer and type of labels. Printers can be divided into:

  • desktop - small dimensions, for low and medium-volume printing; they work well with, for example, price labels or fixed asset labels,

6 Desktop printer - GK420T

  • industrial - large dimensions, high efficiency, for high-volume printing, very durable; they work well for mass applications where it is required to print a large number of labels in the fastest possible time and the best quality,

7 Industrial printer - ZT420

  • mobile - small size printers that enable wireless printing anywhere; used to mark goods in the field.

8 Mobile printer - RW220

Printers can also be distinguished in terms of the type of printing:

  • thermal - thermal printing uses a thermally sensitive material, for example, a suitable paper. The printer head moves directly over the material and the material becomes black as a result of heating the appropriate points of the head. The technology is not very durable. Printing is susceptible to abrasion, humidity, and light, and is therefore used for labels which lifespan may be short and which will not be exposed to harmful factors. Examples of applications include labels for fixed assets in offices.
  • thermal transfer - in this technology the print head has no direct contact with the material on which the paint is applied. In addition to a material carrier (e.g. a roll with labels), a dye carrier (e.g. a roll with an ink ribbon) is also required. The carrier with the dye moves parallel to the carrier of the material and as a result of heating the heating points of the head, the dye is transferred to the material. This print is much more durable and resistant to external factors. Examples of applications include labels used in warehouses or used outside.


The last important element is the choice of labels. You can get the cheapest labels, but then the print quality may only be sufficient, and durability will also leave much to desire. On the other hand, you can purchase high-quality laminated labels, which will both improve the quality and durability of the printout. There are many different types of labels on the market to suit your business needs. So you can come across labels for purely office, warehouse, or outdoor use.

Looking at the above aspects of printing from the hardware side, to choose the best-suited solution, you need to answer a few questions:

  • what is the budget for the purchase of equipment?
  • how much space can be allocated to the printer?
  • how many labels will be printed on average per day/month?
  • what will be the purpose of the printed labels and to what harmful factors they may be exposed to?

After answering these questions, the choice of the right solution should become clear. For example, if the number of printed labels is small (several hundred per month), the labels will be intended for internal use and will not be exposed to negative factors, you can use a desktop printer with cheaper labels. However, if the printer is used in a large warehouse, some of the labels will be for external or transport purposes, the inclination should be towards an industrial printer using thermal transfer printing and high-quality labels.

The next step in the process, which takes into account the use of barcodes, is reading the barcode already physically placed on a given element. The reading stage can be directly connected with the data collection stage. Data can be read with barcode scanners using various technologies:

  • based on LEDs - older scanners that require proximity to read the code,
  • laser - a common solution that allows you to read even from a few meters,
  • linear imager,
  • area imager,
  • using cameras - mobile phones.

9 MS9520 Voyager Scanner

Scanners can be stationary - connected directly to a computer, or mobile, which are undoubtedly better suited for stocktaking or, for example, in warehouse applications.
An important element is what the code is reading:

  • in the case of simple code containing a single piece of information, you can simply use the scanner to read the code directly, without the need for any additional interfaces. The read information is transferred directly to the appropriate medium.
  • in the case of a code containing complex information consisting, for example, of several fields, an interface is required that will properly interpret the read data and pass it on in a processed, readable form.

We can use the read data in two ways:

  • directly - entering the read data immediately into the SAP transaction. As part of this method, you can link two groups of transactions:
  • standard GUI transactions - the user uses the standard SAP GUI on a stationary unit and has a scanner connected. The scanner uses, for example, invoice numbers or material numbers to scan. Scanned data is entered directly into the fields of the transaction on which you are currently working, which speeds up the process and helps to avoid entering errors.
  • console / terminal / scanner transactions - special transactions written for mobile terminals. The user starts the selected transaction on the terminal and then reads the data, which is transferred to the transaction fields. Such application also significantly speeds up the process and helps to avoid mistakes. This is a common practice in warehouses.
  • indirect - the data is read with the help of a scanner, but not immediately used. They are collected into a file or external system. The data may be subject to additional analysis, processing, and verification. For such tasks, external systems are often used, which perform appropriate operations on the collected data or conduct appropriate analyzes based on them, which are not supported by the SAP system. When the data being processed is finished and ready for import, they can be loaded into the SAP system using dedicated transactions or, for example, using web-services. An example of application is the inventory of fixed assets, which requires the collection of the entire data set and only then the development of results based on the provided data set.

In the SAP system, barcodes are used in many solutions belonging to various business or cross-business areas. It all depends on the individual needs of a given customer. By using your transactions to print barcodes and transactions to interpret the read data, you can model a variety of processes, which will largely be based on barcode reading, or this element will only be an addition to improve work. The most common uses are:

  • all kinds of marking of material indexes by number,
  • in the FI-AA module, the designation of fixed assets in kind with the subsequent use of code reading while conducting inventory,
  • in the MM module, the designation of material indexes and the use of code reading in the inventory process,
  • in the WM module: labels for goods, for articles, SSCC, location labels, for containers,
  • in the SD module, marking of outgoing deliveries and sales invoices,
  • in FI, it is possible to print purchase invoice numbers and use them in the OCR process and invoice circulation.

10 An example of a self-product label printed from the SAP system

Above are some examples of barcode applications. These are certainly not all applications, but only a part of them. The costs of using barcodes for hardware and software, with skillful addressing of the requirements, will certainly be favorable to the offered improvements and possibilities. The use of these solutions in today's enterprises can improve work in various business areas. In some cases, it may be a small change that improves efficiency and allows you to avoid some errors at the data input stage, for other companies, e.g. those using large warehouses and with a resilient WM module, it may be an essential element for proper and effective management of the enterprise.

Mateusz Szwajka - ABAP consultant

He has over 3 years of experience in programming in the SAP system in MM, WM, SD, PP, QM, FI, FI-AA modules and over 7 years of experience in designing and developing software in various technologies and on various platforms.