FAQ: TBarCode/SAPwin - SAP Barcode DLL
Data Limit with 2D Barcodes
Data Limit with 2D Barcodes
Depending on SAP version and whether you use SAPscript or Smart Forms you have a limit between 70 and 255 characters for the bar codes.
- Technical background: In SAP the lines are processed in two steps: In the first step, the paragraph is treated like normal text, i.e. line breaks are added as needed (depending on the available space and font size). In the second step, the line marked as barcode is passed to the barcode generator and the barcode image is added. But only the first line (before the text break) is converted to a barcode - the others remain unconverted. So the goal is to avoid unnecessary text breaks and to fit the barcode data into a line of text.
Below we describe the possible workarounds to overcome this limit:
Font Size
Use a very small font size (e.g. 6 pt) for the line, where you draw the bar code. This increases the number of characters for the actual line.
Smart Forms
Take a look at OSS notes 497380. Please try activating the barcode via print control and use several fields (each 255).
SAPscript
Use the Print control command as shown below. The name of the print controls can be seen in the device type (SE73 printer barcodes). Split up the data into several fields (each 68).
/: PRINT-CONTROL SBP90. = &V_BC1& = &V_BC2& /: PRINT-CONTROL SBS01.
According to SAP note 197177 it may be necessary to surround the print control command by a small font tag:
* <fs><32> /: PRINT-CONTROL SBP90. = &V_BC1& = &V_BC2& /: PRINT-CONTROL SBS01. * </>
Alternatively you can use the RAWTEXT command as shown in SAP note 497491:
/: PRINT-CONTROL SBP90. /: RAWTEXT &V_BC1& /: RAWTEXT &V_BC2& /: PRINT-CONTROL SBS01.
Barcode DLL Variables
The Barcode DLL supports "variables", which are concatenated together before creating the bar code. You also have to split up the data into multiple "data chunks" with that method. Advantage: You can use the common character formats for creating the bar code and can omit the (device type specific) print control command.