SAP BASIS Configuration Create a Bar code prefix to Device type se71,se73,spad

** Credit Web
Only Se71 is used to create a barcode To Create a Bar code prefix:
1) Go to T-code - SPAD
-> Full Administration
-> Click on Device Type
-> Double click the device for which you wish to create the print control
->Click on Print Control tab
->Click on change mode
-> Click the plus sign to add a row or prefix say SBP99 (Prefix must start with SBP)
-> save you changes , it will ask for request
-> create request and save
2) Now when you go to SE73
if you enter SBP00 for you device it will add the newly created Prefix Create a character format C1.Assign a barcode to the character format.
Check the check box for the barcode. The place where you are using the field value use like this &itab-field& .
You will get the field value in the form of barcode.
Which barcode printer are you using ?
Can you download this file and see.
http://www.servopack.de/Files/HB/ZPLcommands.pdf.
It will give an idea about barcode commands.
Check this link:
http://www.sap-img.com/abap/questions-about-bar-code-printing-in-sap.htm
Check this link: http://help.sap.com/saphelp_nw04/helpdata/en/d9/4a94c851ea11d189570000e829fbbd/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/66/1b45c136639542a83663072a74a21c/content.htm
Detailed information about SAP Barcodes A barcode solution consists of the following: - a barcode printer - a barcode reader - a mobile data collection application/program A barcode label is a special symbology to represent human readable information such as a material number or batch number in machine readable format. There are different symbologies for different applications and different industries. Luckily, you need not worry to much about that as the logistics supply chain has mostly standardized on 3 of 9 and 128 barcode symbologies - which all barcode readers support and which SAP support natively in it's printing protocols. You can print barcodes from SAP by modifying an existing output form.
Behind every output form is a print program that collects all the data and then pass it to the form. The form contains the layout as well as the font, line and paragraph formats.
These forms are designed using SAPScript (a very easy but frustratingly simplistic form format language) or SmartForms that is more of a graphical form design tool.
Barcodes are nothing more than a font definition and is part of the style sheet associated with a particular SAPScript form.
The most important aspect is to place a parameter in the line of the form that points to the data element that you want to represent as barcode on the form, i.e. material number. Next you need to set the font for that parameter value to one of the supported barcode symbologies. Check this link https://www.sdn.sap.com/irj/sdn/thread?threadID=484714 https://www.sdn.sap.com/irj/sdn/thread?threadID=476735 Reward all helpfull answers
Introduction
This paper describes how to print barcodes on SAP systems using downloadable fonts and standard laser printers. The process is relatively simple:
• Copy a barcode font file from the host system to the destination printer.
• Create an output file with formatted text strings and font selection commands
• Send the output file to the printer.
PCL (Printer Command Language) is a standard developed by Hewlett-Packard Corporation which
defines a wide range of commands that control the formatting of documents on laser printers. PCL is supported by virtually every laser printer manufactured. PCL includes specifications for "soft fonts" which, when downloaded to a printer, will be automatically stored in the printer's memory and be available for use.
Most laser printers do not include native barcode capability. Those that do often employ a variety of command syntaxes, making it difficult to mix printer brands within a single system. Plug-in barcode modules are available, but are often printer brand or model-specific, and the cost per printer stays relatively level (generally from $250 to $425 per printer depending on capabilities of the module).
Downloadable soft fonts work on any brand or model of printer with the same command syntax, simplifying programming in large installations and expanding the range of printers that can be used. Some high-capacity printers include programmable memory or hard disk drives and can store downloaded fonts permanently. Although downloadable fonts do not offer the automated formatting features found in the high-end hardware modules, the cost per printer is dramatically less.
The downloadable fonts described in this paper are available as pre-built kits or can be generated using the Barcode Font Generator from MEC Software. Sample fonts, demonstration programs, and pricing/licensing information are available through The Barcode Software Center, on the web at www.makebarcode.com.
The version of SAP used in preparing this paper was 4.6c.
Downloading Fonts to the Printer
Before barcodes can be printed, a barcode font must be available in the printer's memory.  MEC Software PCL-5 fonts include all of the required PCL commands and data; all that is required is to send the font file from the host computer to the printer. There are several methods for sending a font to your printer. Two that work well in the SAP/Windows environment are lpr and copy.
lpr
The lpr command can be an effective method for downloading fonts. Unix and Linux support lpr; Windows/NT, 2000, and XP also support lpr, but it may not be installed by default (lpr may be called Unix printing by the Windows setup process). The general form of the lpr command is:
# lpr -S<server> -P<printer> [-C<class>] [-J<job name>]
[-O<option>] <filename>
As an example, let's assume that the destination printer is available at IP address 192.168.100.40 and the file BC_3of9_4pitch.dsf contains the downloadable PCL barcode font. We must use -O (option) followed by a lower case letter "L" to specify binary mode (Windows requires a lower case "o"):
# lpr -S192.168.100.40 -P192.168-100.40 -Ol myfont.dsf
copy
You can simply Copy the font file to the printer port. In Windows, open a MS-DOS command line window. Use the /b (binary) command line option:
C:\> COPY /B myfont.dsf LPT1:
Note: If your system does not support long filenames you will need to rename the files. For example: C39_4PIT.DSF.
If you are in a MS-DOS command prompt under Windows and the destination printer is on the network, using the printer's network name may not work depending on your version of Windows. For example, this command should send the font to the printer under Windows/98 and Windows/2000, but may simply make a copy of the file on disk with Windows/95:
C:\> COPY /B myfont.dsf \\MAIN\LASER
You may first have to assign the printer to a local printer port with the NETUSE command. The port does not have to physically exist, and you should not use a port that actually has a local printer attached to it. For example, if you have local printers attached to LPT1 and LPT2 and a network printer named "\\Main\Laser," you could assign LPT3 to the network printer:
C:\> NETUSE LPT3: "\\MAIN\LASER"
C:\> COPY /B myfont.dsf LPT3:
Defining Printer Control Sequences in SAP
We need to define a barcode prefix (a command string to turn on the barcode font) and a suffix (another command to switch back to a normal text font). First, we need to get to the right screen. Select SAP Transaction SPAD (Spool Administration) to display Spool Administration: Initial Screen. Then click the Full Administration button.
clip_image001
Select the Device Types tab and select the printer that will be printing the barcodes (HPLJ4, for example).
clip_image002
Select the green check mark after entry of the Device Type to display the Spool Administration: Device Type screen, then click on the Print Controls tab.
clip_image003
The Print Controls page displays a list of defined print control sequences, each identified by a name. You can create new sequences or modify existing sequences. Let's create a control sequence named BCPFX to define the prefix that will turn on the barcode. Each downloaded font is identified by a number which is built into the font. Assuming that the font we want is number 200, we will need the following characters:
Escape Code (hex 1B)
Opening (left) parenthesis character (hex 28)
Font ID 200 (hex 32 30 30)
An upper case X to mark the end of the command (hex 58)
All of these characters need to be entered as a single string (no spaces) in the Control Character Sequence column: 1B2832303058. We also need to define a sequence to turn off the barcode font and switch back to a normal text font. Let's create sequence BCSFX to switch to the printer's default font. The PCL command to do this requires the following characters:
Escape Code (hex 1B)
Opening (left) parenthesis character (hex 28)
The number 3 (hex 33)
An @ symbol (hex 40)
So the complete sequence would be written as: 1B283340. You might prefer to switch to a specific text font instead of the printer's default. Complete details can be found in the PCL Reference Manual, available from Hewlett-Packard.
Printing Barcodes with ABAP or SAPSCRIPT
We are now ready to print barcodes using an ABAP report program or a SAPSCRIPT form. In these examples we are using Code 39 barcodes which require very little formatting (all we have to do is add asterisks before and after the data).
Sample ABAP Program:
DATA: BAR_CODE1(16) VALUE `*ABC01230123A01*'
NEW-PAGE PRINT ON IMMEDIATELY `X'.
FORMAT COLOR OFF INTENSIFIED OFF.
* If the barcode is the first element on the page, the following Write
* statement is needed (otherwise you get a date in the first print
* control.
WRITE:/
* Turn on the barcode font, print the data, and switch back to the
* printer's default font. Be sure to use NO-GAP to avoid unwanted
* characters or CR/LF.
PRINT-CONTROL FUNCTION `BCPFX'
WRITE: BAR_CODE1 NO-GAP
PRINT-CONTROL FUNCTION `BCSFX'
* Add a Write statement to prevent insertion of CR/LF into the barcode.
WRITE:/
Sample SAPSCRIPT
* Variable BAR_CODE1 contains the barcode data, including asterisks.
* The & is needed to avoid unwanted spaces or CR/LF characters
/E LINE
/: PRINT-CONTROL BCPFX
= &BAR_CODE1&
/: PRINT-CONTROL BCSFX

1 comments:

Zebra QLn320 said...

for sharing excellent informations on Zebra Barcode Printers . Enjoyed reading post on your blog.!

Loading