|
FAQ: TBarCode/SAPwin - SAP Barcode DLL | | | | | | FAQ for TBarCode/SAPwin - TEC-IT's Barcode DLL for SAPsprint, SAPlpd and SAPGUI. | | |
SAP Barcode Software | | Which SAP Bar Code Product is best Suited for my Environment?TEC-IT offers four different solutions for bar code generation in SAP. Each solution has its special advantages and characteristics.
TBarCode/Direct
If your company mainly uses PostScript® compatible printers, then TBarCode/Direct is the best solution. No middleware, central installation, all printers (with PostScript).
TBarCode/SAPwin
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
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.
TBarCode/Embedded
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. | |
Installation | | What are the Basic Installation and Configuration Steps?You must use at least one of the Spool Transfer Programs SAPsprint or SAPlpd - or the SAPGUI (Windows) Client.
Using SAPsprint
- Install TBarCode/SAPwin in the SAPsprint installation folder.
SAPsprint is a Spool Transfer Software from SAP (see OSS Note # 894444) designed to be used on a print server (Windows platform).
Using SAPGUI
- Using Windows Client (local printing), install TBarCode/SAPwin on the SAPGUI directory (method G) or into the SAPGUI SAPlpd directory.
Configuring SAP
- Copy the device type SWIN to ZSWIN.
- In SPAD, add a new printer or modify an existing printer (e.g. your local printer), use ZSWIN as device type. The host spool method can be G (GUI), F (Frontend/SAPlpd) or S (Server/SAPsprint).
- Print the test document SAPSCRIPT-BARCODETEST available on client 00. You should see bar codes on the print-out by then.
More Information:
For detailed TBarCode/SAPwin installation instructions read the TBarCode/SAPwin Manual. | |
Data Matrix | | Insert a Data Matrix Barcode into your SAP systemHere are the steps to insert a Data Matrix bar code into your SAP system.
Precautions
- Make sure you have a copy of a SAPWIN based device type (e.g. copy device type SWIN to ZSWIN – see our manual 6 Create a Device Type Copy).
- Assign this device type to a printer – see manual 7 Assign the Device Type to a Printer.
- You can test your TBarCode/SAPwin installation by printing the SAPSCRIPT- BARCODETEST (client 00) - see our manual 9 Test Barcode Printing.. If this SAPscript document does not exist you can request it from our support.
Add Data Matrix System Bar Code
- Use Transaction SE73 – System Bar codes (see manual 12.2.1 New System Barcode). Add a new system bar code (name space Z... e.g. name = ZDATMAT) with traditional bar code technology.
Define Data Matrix Printer Barcode
- Enter Transaction SE73 – Printer bar codes. Follow the steps in the manual section "8 Define Printer Barcodes".
- Select ZDATMAT and add a new prefix for it (e.g. SBP90), as for the suffix you can use the existing suffix SBS01.
Edit the prefix (SBP90) and enter the control sequence: bC=DMX,M=508,D=
Make sure that the prefix Variant is set to 5, you can change that in transaction SPAD. The Printcontrol must be marked Extended (see manual 21.4.4 Wrong Variant of Print-Control Prefix.)
Add Data Matrix Character Format (Style)
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.
- Edit the style you have assigned to your form and add ZDATMAT as new barcode character format.
- Use transaction SE72 for editing SAPscript styles.
- Use transaction SmartStyles for editing SmartForm styles (see manual 11.2.2)
More Printcontrols
- DP Premium Address 22x22 Data Matrix
bC=DMX,M=423,DMB=1,DMS=7,E=1,D=
- GS1 Data Matrix
bC=DMX,M=508,DMF=1,D=
| |
Device Type | | How can I Export a Device Type?
- Enter transaction SPAD
- Main Menu: Utilities --> For Device Types --> Export
- Object Selection = Device Type
- Enter the name of the device type into the input field [Object Name]
- Click Execute or press F8
- In the following dialog enter (or confirm) the path where the export file should be saved
| |
Device Type | | How can I print Chinese characters?Please look at SAP OSS Note # 83502.
In your SAP system there should be a device type CNSAPWIN for printing Chinese characters.
- Make a copy of it and adjust the Printer Barcodes (transaction SE73) as shown in our manual.
- Then assign this device type to your printer (transaction SPAD).
For TBarCode/SAPwin you need a device type based on the SAPwin device driver! | |
Unwanted Characters | | Unwanted Characters are Printed Beside the Bar CodeWrong defined print control suffix SBS01:
Please read FAQ section 21.8 of the user manual to learn how to solve this problem.
Please check out SAP Note 1079665 - Missing formats and bar codes in SAPWIN device types | |
SAPKB70026 | | Changed Barcode Properties After Support-Package SAPKB70026Problem: 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. | |
No Barcodes | | No Bar Codes on the PrintoutPossible reasons:
- Wrong host spool access method,
- Wrong device type,
- Wrong print controls
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 | |
SAPsprint | | Wrong Printing Order, Intermittent LicensingThe following issues may be caused by parallel job processing (multi-threading) in SAPsprint.
Wrong Printing Order
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.
No Bar Codes after Heavy Traffic
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.
- This may be caused by multi-threading. See previous solution Wrong Printing Order
Some bar codes are licensed, some bar codes have demo text
- Use the latest version of TBarCode/SAPwin
- Check if you have multiple versions of the barcode.dll and/or barcode.ini file in your system. You should use only one version. Make sure that the license key is the same in all barcode.ini files.
- This may be caused by multi-threading. See previous solution Wrong Printing Order....
| |
SAPsprint Crash | | SAPsprint Print Job Terminates with CreateDCWOSS 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:
- The service restarts automatically once the
CreateDCW is one of the first calls to the printer driver. If this fails, you will not be able to print. With the Windows printer driver, the Windows spooler can create the final print job and then use the print monitor to transmit the print job to the printer.CreateDCW
problem occurs. You can prevent auto-restart by setting the parameter values to 1.
Key: IgnoreDCError
Default: 0
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.
Key: RestartAfterJobs
Default: 0
Other values: any number
For printing problems, Microsoft recommends the procedure that is described at http://support.microsoft.com/kb/260142/EN-US/
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. | |
Printer Driver | | Distorted Barcode ImageThis behavior is most often caused by the Windows printer driver.
- Get the latest version of TBarCode/SAPwin.
- Change the drawing method in the barcode.ini file:
[DRAW_MODE]
UseGDIRect=1
When using SAPlpd, make a restart.
You can also try the following:
- Print bar-codes without human readable text: Set A=0 in the print control Prefix of your printer barcode (edit it with TA SE73).
- Change the printing direction: set direction=1 in the barcode.ini file.
- Such problems may also be caused by multi-threading. See previous solution.
| |
| | SAPlpd Crashes with High Amount of Bar Code DataUsing 2D bar codes with a huge amount of data (e.g. via SAPscript's rawtext command), once you reach the limit of about 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. | |
Barcode Position | | How can I Fine Tune the Barcode Position?Position may be:
- relative (no X/Y parameters specified in Printcontrol) or
- absolute (X/Y parameters specified in Printcontrol)
Additionally you can change the printing direction to print the barcode from base line upwards - see parameter Direction in the barcode.ini file:
Direction=1
If you print the barcode always to the same position you can specify X and/or Y parameters in the Printcontrol.
-
Set the target coordinates with the parameters X=[mm],Y=[mm] in the Printcontrol prefix:
bC=39,X=100,Y=50,B=50,H=20,D=
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.
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).
| |
Barcode Size, Barcode Rotation | | How can I Change the Size of the Bar Code?You can change the bar code size and orientation in the Printer Barcode Printcontrol Prefix. The following parameters are available:
- B= ... controls the width of the symbol in mms
- H= ... controls the height of the symbol in mms
- M= ... controls the module width of the symbol (in 1/1000 mms)
- R= ... adjust the orientation of the barcode in degree (optional)
* If parameter M is used, omit the B parameter!
Examples
- Width: 70 mm, Height: 30 mm, Rotation=90°
bC=E128,B=70,H=30,A=1,R=90,D=
- Module Width: 0.254 mm, Height: 30 mm
bC=E128,M=254,H=30,A=1,D=
You can edit the Printcontrol Prefix in transaction SE73 (printer bar codes).
- Select your device type e.g. ZSWIN. In the edit dialog, click the prefix and then the button Maintain Printcontrol. Change the Printcontrol parameters in the Control Char Sequence input field.
| |
Barcode Font | | How can I Change the Font of the Human Readable Text?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.
Print Control
The font for a specific bar code type (printer bar code) can be adjusted individually via Print Control parameters.
- FN=Font Name
- FS=Font Size [pt]
- FW=Font weight [N.. normal | B .. Bold]
Example (adjust 10 pt Arial):
bC=39,M=254,H=16,FN=Arial,FS=10,D=
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.
Barcode.ini
| |
Log File | | Barcode Log File CoordinatesThe following sample describes the barcode position parameters you can see in the barcode.log file:
- Printcontrol parameters are shown first, e.g:
C=128B,B=43,H=7,X=0,A=0,D=
The X position in our example is zero. The Y position is not specified, so it will be taken from actual cursor position by default.
- The next parameter is the actual printing cursor position passed from SAP to our DLL. This value is relevant for relative positioning:
Pos: xpos: 240, ypos: 2050
- And then the bounding rectangle of the barcode:
Start point: x: 0, y: 2215
End point: x: 1016, y: 2050
The zero-zero point (origin) of the coordinates depends on the used mapping mode. The origin can either be the top left corner or the bottom left corner of the document.
| |
Decoding Problems | | How can I Optimize the Bar Code Quality?The bar code module width parameter influences the reading quality of the bar code.
Note: Use standard settings for the Print ratio is the ratio of bar widths and spacesprint ratio e.g. Code-128 has a ratio of 1:2:3:4.
Example: 200 dpi printer
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.
For 203 dpi printers see the next FAQ
| |
Barcode Quality | | Barcode Quality Problems with 203 dpi Printers (Zebra etc)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.
Solution
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. | |
FNC1 | | EAN-128 Variable Length AI With FNC1
EAN128 uses FNC1 character on the first position of the code to mark the bar code as EAN-128 and identify it from Code-128. This is done automatically by TEC-IT Barcode Software, so you don't need to do it manually!
| |
Silent Setup | | How can I run a Silent Setup With TBarCode/SAPwin?The setup for TBarCode/SAPwin is based on MSI where we have a "quiet" option available. Call the MSI package with the following command line parameters:
msiexec /i TBarCode_SAPwin.msi INSTALLDIR="C:\MyInstallDir" ADDLOCAL=FeatBin /qn
Declaration of parameters:
/i .............................indicates which package is to be installed
INSTALLDIR .........sets the installation directory
ADDLOCAL ...........indicates which features are installed (ADDLOCAL=FeatBin
installs only the Barcode DLL without user manual)
/qn .........................quiet Installation (No Dialogs)
You can suppress the feedback page during uninstall with the NO_UI property set to 0.
msiexec /x TBarCode_SAPwin.msi /qb NO_UI=0
More supported parameters are listed here: http://technet.microsoft.com/en-us/library/cc759262.aspx
Note: The files "SAPlpd.exe" or "SAPwin.dll" must exist in the destination directory, otherwise setup aborts. In quiet mode, all errors are suppressed.
| |
Host Spool Access Methods | | Wrong Host Spool Access Method (HSAM)Destination computer is not available (HSAM "S")
Please keep in mind that computer and printer name are case-sensitive!
Cross-check test: Use the IP address instead of the host name.
In case of thermal printers (like TEC-B482): No ribbon feed.
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:
"\\SAPlpdHostName\PrinterShareName". | |
PDF | | No Bar Codes with PDF Printer in SAP!There is a difference between printing and PDF generation in SAP:
Printing
The barcode is generated during the spooling process to the printer. The print job is routed through SAPGUI, SAPlpd or SAPsprint and these programs call our Barcode DLL for barcode insertion.
PDF from SAP
With PDF it is different - the SAP PDF Generator generates the PDF completely on the server and here we have no possibility to insert the bar code. SAP PDF inserts no barcode, only a text note.
Combination Printing + PDF
The only solution for generating PDF documents with real visible bar codes 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. | |
SAPsprint | | SAPsprint - Problems With Slow PrintingAre 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.
- Does phase 33 take too long?
- Does the printer carry out an emulation and are frames or colors printed?
- There are printers which provide a complete functional emulation of HP LaserJet, but are very slow in executing certain functions.
See SAP Note 15594
| |
SAPsprint | | SAPsprint Cannot be Started After Barcode DLL InstallationAfter 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.
Cause:
This issue only occurs with a special SAPsprint version and is due to a SAPsprint program error when loading the Barcode DLL:
- sapsprint.exe Version 1.0.2.6
- sapwin.dll Version 1.0.3.1
Solution:
- Install the latest SAPsprint patch: xSPrint_1_10008892 (7200.1.2.9 or higher).
-
Please make sure that you use TBarCode/SAPwin with version 6.0.3 / 9.0.1 (or higher).
| |
|
|
© TEC-IT Datenverarbeitung GmbH, Austria ++43(0)7252/72720 office@tec-it.com |
|