条码软件 - SAP
TEC-IT offers four different solutions for bar code generation in SAP. Each solution has its special advantages and characteristics.
If your company mainly uses PostScript® compatible printers, then TBarCode/Direct is the best solution. No middleware, central installation, all printers (with PostScript).
This Barcode DLL is recommended for Microsoft® Windows environments in which you can print centrally via a print server with SAPsprint (spooling software of SAP) or on the SAPGUI client directly. Any printer using Windows drivers can be connected.
TBarCode/X is an all-round barcode software solution for UNIX®, Linux® and Mac OS X® environments. TBarCode/X can be installed into the spool system of a print server (or on the SAP server itself). Suitable for PCL and PostScript® printers.
If you plan the purchase of a network spool server, the combination of an SEH Print Spool Appliance and TBarCode/Embedded is the appropriate solution. Suitable for PCL and PostScript® printers.
You must use at least one of the Spool Transfer Programs SAPsprint or SAPlpd - or the SAPGUI (Windows) Client.
For detailed TBarCode/SAPwin installation instructions read the TBarCode/SAPwin Manual.
Here are the steps to insert a Data Matrix bar code into your SAP system.
Edit the prefix (SBP90) and enter the control sequence: bC=DMX,M=508,D=
There are multiple ways to insert a barcode into your form (see manual 11 Using Barcodes in SAP). If you decided to use a bar code character format (preferred way), you have to add ZDATMAT as new available character format to your style.
Here are the steps to insert a QR Code 2D bar code into your SAP system.
Edit the prefix (SBP91) and enter the control sequence: bC=QRC,M=508,D=
There are multiple ways to insert a barcode into your form (see manual 11 Using Barcodes in SAP). If you decided to use a bar code character format (preferred way), you have to add ZQRCODE as new available character format to your style.
Depending on SAP version and whether you use SAPscript or SMARTFORMS you have a limit between 70 and 255 characters for the bar codes. Below we describe the possible workarounds to overcome this limit:
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.
Take a look at OSS notes 497380. Please try activating the bar code via print control and use several fields (each 255).
Use the Print control command as shown below. The name of the print controls can be seen in the device type (SE73 printer bar codes). Split up the data into several fields (each 68).
/: PRINT-CONTROL SBP90.
/: PRINT-CONTROL SBS01.
According to SAP note 197177 it may be necessary to surround the print control command by a small font tag:
/: PRINT-CONTROL SBP90.
/: 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.
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.
See 2D Barcode Data Splitting
Please look at SAP OSS Note # 83502.
If your SAP system is a Unicode system, there should be a device type SWINCFC for printing Chinese characters. For Non-Unicode systems you can use CNSAPWIN.
Wrong defined print control suffix SBS01:
Problem: After installation of SAPKB70026 bar codes may be printed with different size or with different bar code properties.
Reason: The support package may switch from conventional bar code technology (Barcode DLL) to new bar code technology from SAP.
The new bar code technology from SAP creates an image, which will be insert into the print data stream on server side. The Barcode DLL remains unused, settings from printer bar codes (SE73) are ignored.
We recommend to contact SAP support. We don't know any method to switch a system bar code from new bar code technology back to conventional bar code technology in order to restore the orignal behaviour.
Please read FAQ section 22.5 of the user manual. Make sure you have the actual version of TBarCode/SAPwin installed.
Please check out SAP Note 1079665 - Missing formats and bar codes in SAPWIN device types
The following issues may be caused by parallel job processing (multi-threading) in SAPsprint.
Fix: Turn off print job based multi-threading with the following command line:
sapsprint -oi ProcessingMode 1
* This parameter is supported in SAPsprint 1015.
For problems with printing sequence caused by multi-threading read SAP Note 1054561.
Some users are printing at the same time large print jobs via SAPsprint. After the end of a such a print job containing bar codes, the bar codes on subsequent print jobs are missing.
OSS Note 1069483 -"Error: CreateDCW failed: The operation completed successfully".
This error is caused by a third party print monitor (coming with Windows printer driver installation).
The following options in SAPsprint Version 1018 and later can deal with the CreateDCW error:
Other values: 1
The SAPSprint service restarts automatically after a specified number of print jobs. This mainly reduces the occurrence of the CreateDCW problem described in Note 1069483. If the value is set to 0 (default), this service will not restart.
Other values: any number
For printing problems, Microsoft recommends the procedure that is described at http://support.microsoft.com/kb/260142
Or try to update or downgrade the printer driver / printer port software. Not always newer versions give better results - sometimes elder drivers are more stable. A printer with PCL emulation can usually use a standard HP Laserjet 4 PCL-5 driver as well. It is also possible to use a standard Adobe driver for PostScript emulation. Often the so called "universal drivers" create more problems as the printer specific driver.
This behavior is most often caused by the Windows printer driver.
You can also try the following:
Using 2D bar codes with a huge amount of data (e.g. via SAPscript's rawtext command), once you reach the limit of about 250 - 300 characters, SAPlpd suddenly crashes. This seems to be caused by a buffer limit in SAPlpd and is not a problem of TBarCode/SAPwin.
First of all verify if you can change from SAPlpd to newer SAPSprint or SAPFprint: From SAPlpd to
SAPSprint and SAPFprint
A workaround for SAPlpd would be the data splitting feature of TBarCode/SAPwin. It separates the data portions into 2 or more blocks (infos on request). You can stay below the crash limit this way.
Position may be:
Additionally you can change the printing direction to print the barcode from base line upwards - see parameter Direction in the barcode.ini file:
If you print the barcode always to the same position you can specify X and/or Y parameters in the Printcontrol.
If the barcode is printed on a relative position (inline) you can use the Shift parameter in the Barcode.ini file to fine-tune the bar codes Y position. The shift parameter was introduced to overwhelm printer driver problems or to make relative positioning compatible with other solutions (e.g. hardware barcode printer extensions).
You can change the bar code size and orientation in the Printer Barcode Printcontrol Prefix. The following parameters are available:
You can edit the Printcontrol Prefix in transaction SE73 (printer bar codes).
By default the Barcode DLL uses the font settings from SAPsprint or SAPGUI (in most cases equivalent to the font used in previous text output before the bar code). If you want to specify the font of the human readable text to be different you have the following possibilities.
The font for a specific bar code type (printer bar code) can be adjusted individually via Print Control parameters.
Example (adjust 10 pt Arial):
The print control prefix can be modified in transaction SE73 (printer bar codes). Click the prefix, and then the button Maintain PrintControl. After that, a window will be displayed allowing you to change the character sequence.
The following sample describes the barcode position parameters you can see in the barcode.log file:
Pos: xpos: 240, ypos: 2050
Start point: x: 0, y: 2215
End point: x: 1016, y: 2050
The bar code module width parameter influences the reading quality of the bar code.
If the printer prints with 200 dpi, set the module width so that it corresponds exactly with an integer multiple of the width of one or more printer pixels. For example, use 1 pixel (which is equivalent to 0.127mm in this case) for 200 dpi.
According to most symbology specifications, a module width below 0.19 mm should be avoided. In such a case, at least 2 printer pixels should be set for bar codes to achieve a module width of 0.254 mm.
If the module width is too small, the bar code width is also too small. Use the following settings:
3 x 0.127mms = 0.381mms
4 x 0.127mms = 0.508mms
Conversion table for millimeters to inch:
0.127 mms = 0.005 inch (to small)
0.19 mms = 0.007 inch (minimum m.w.)
0.254 mms = 0.010 inch (2 printer pixel)
0.381 mms = 0.015 inch (3 printer pixel)
0.508 mms = 0.020 inch (4 printer pixel)
Set the module width based on the above values to avoid resolution errors. If errors still occur (because of minor rounding errors), try using 0.509 instead of 0.508.
You can also use Barcode Studio with the Quality Watch feature to detect printing tolerances and find out the optimal module width value.
You may encounter bar code quality problems when printing to a thermal transfer printer with 203 dpi
Adjusting the module width to the printer resolution is the standard solution for such problems. But with 203 dpi printers we have one particularity shown by the following example.
Three printer dots at 203 dpi correspond to 0,3753694581 mm. But the module width in the print control can be adjusted to 0.375 mm only (no more fractional digits can be specified). This approach leads to an aberration of 0.000369 mm per bar/space module in the symbol. This sounds like a very small error, but the errors add up and lead to an aberration of one or more printer dots when printing wider bar codes.
With the OptResolution flag the module width can be reduced to the next full pixel boundaries thus reducing the printing tolerance to a minimum.
This way the Barcode DLL will calculate a "fallback" module width of 0,3753694581 mm (according to 203 dpi) thus avoiding the aberration mentioned above.
21 + serial number + ! + 11 + production date.
211234 FNC1 11010108
The setup for TBarCode/SAPwin V10.0 is based on MSI where we have a "quiet" option available. Call the MSI package with the following command line parameters:
Install Barcode DLL for SAPSprint into default directory:
Install Barcode DLL for SAPGUI into SAPGUI directory:
Install Barcode DLL for SAPlpd into default directory:
Install Barcode DLL for SAPlpd into custom directory:
/i .............................indicates which package is to be installed
INSTALLDIR ..........sets the installation directory of SAPSprint/SAPGUI (optional)
SAPLPD_DIR .........sets the installation directory of SAPlpd (optional)
ADDLOCAL ...........indicates which features are installed (comma separated)
FeatBin ........... Barcode DLL for SAPSprint/SAPGUI
FeatSAPlpd .... Barcode DLL for SAPlpd
FeatDocu ........ User Manual
/qn .........................quiet Installation (no dialogs)
You can suppress the feedback page during uninstall with the NO_UI property set to 0.
More supported parameters are listed here: http://technet.microsoft.com/en-us/library/cc759262.aspx
Please keep in mind that computer and printer name are case-sensitive!
Cross-check test: Use the IP address instead of the host name.
Use the host spool access method “S” instead of “F”. Therefore you’ll need the name of the computer on which SAPlpd is running (make sure that SAPlpd is already running, SAPlpd does not start automatically when using HSAM “S”!). The share name of the printer is to be indicated as follows:
There is a difference between printing and PDF generation in SAP:
The only solution for generating PDF documents with real visible bar codes from the Barcode DLL is a Windows PDF printer software. You print to this printer like a normal printer but the driver of this software generates a PDF instead of a print out.
PDF Printer software is available from several vendors. You should select a tool, which allows server operation and is not dialog based (= generates PDF document names and stores PDF files automatically).
Adjusting a sufficient image output resolution (600 dpi) in the PDF driver is important to get readable barcodes.
Are you using SAPSprint in combination with Windows printer drivers? Please enable SAPSprint debugging as follows (on the command line):
sapsprint -oi LogLevel 5
Normally the processing time is not expended in SAPSprint itself, but in the Windows printer drivers. Some use up a LOT of processing time.
After installing TBarCode/SAPwin into the SAPsprint directory, the service cannot be restarted. In the Event log the following message is displayed:
The SAPSprint service failed to start due to the following error: The service did not respond to the start or control request in a timely fashion.
This issue is due to a SAPsprint program error when loading the Barcode DLL and occurs with a specific SAPsprint version:
See also OSS Note# 1461054 (SAPSprint crash with PDFPRINT or BARCODE DLL)
See also SAPsprint change history:
SAPSprint/SAPWIN File Version 7200.x.x.8/7200.x.x.34:
Bug fix: Crash with BARCODE.DLL
Bug fix: Print empty pages
Optimization: Improved tray selection
Optimization: New version info scheme