‎2007 Oct 05 12:28 PM
hi,
i am facing a problem in printing a barcode in the script.
i have created a new barcode in se73.
when i print preview that in se73,it is printed correctly.
when i include it in a character format in my script
and then print it,it doesnt print correctly.
the same barcode is being shown for all figures.
just 6 vertical lines being printed.
<b>| | | | | |</b>
can anyone please tell me where the mistake may be?
‎2007 Oct 05 12:31 PM
Hi,
in SAPSCRIPTS, the barcodes will be generated in the Printer itself, so ask your basis people whether the Printer which you are using is compatable for that BARCODE,
Regards
Sudheer
‎2007 Oct 05 12:31 PM
Hi,
in SAPSCRIPTS, the barcodes will be generated in the Printer itself, so ask your basis people whether the Printer which you are using is compatable for that BARCODE,
Regards
Sudheer
‎2007 Oct 05 12:35 PM
hi sudheer,
actually i m getting this kind of output in the print preview.
‎2007 Oct 05 12:37 PM
Generally Barcode will be created Basis people. It will be assigned in as a FONT. If you want to call in the sap script / smartform you need to assign it to either the Paragraph format or print program and then in the text it should be called.
check this below link...
http://help.sap.com/saphelp_nw04/helpdata/en/66/1b45c136639542a83663072a74a21c/content.htm
*************************
You have to use spacila BARCODE printers for that.
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
<C1> &itab-field& </C1>.
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://help.sap.com/saphelp_nw04/helpdata/en/d9/4a94c851ea11d189570000e829fbbd/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.
********************************
go to se73->click on system bar codes radio button->then clk on change button->clk on crate button(f5) at tool bar->popwindow comes->clk on new->give barcode name with z or y(like zjk) and short text ,clk on continue.->from there continuoesly click on continue button-> then save-> it will give request number,then clk on continue button twice.
then it will display list of all barcode .ur barcode is at last position in that list.remember that name
go to se71 .clk on character format->then clk f4 on barcode text box.in that list u find ur barcode which is created at se73(zjk).
go to text editor(f9).
write like this <C1> &Zjk& </C1>
save and activate the script and go to driver program activate and excute
****************************
barcodes wil be generated in the printer itself, if you give <BC>&HD_GEN-MATERIAL_NUMBER&<> then you have a value for "Barcode" .
Adding Your Own Bar Code:-
http://help.sap.com/saphelp_nw04/helpdata/en/d9/4a94fc51ea11d189570000e829fbbd/content.htm
barcodes in SAP
http://help.sap.com/saphelp_nw04/helpdata/en/68/4a0d5b74110d44b1b88d9b6aa1315b/content.htm
Print Unique Indicator as a Barcode
The printing of unique indicators of elements (reference numbers of records, case indicators, or document numbers) as barcodes is controlled by SAPscript forms.
SAP delivers a common SAPscript form based on the SAP barcode type AUFNR for records, cases, documents and incoming post items.
To create another SAP barcode type, you can copy the SAPscript form RMPS_BARCODE and then adjust it to your own requirements. Then you have to define the new form using the following attribute names in the table SCMGPARAM:
From within a SAPscript form, a subroutine GET_BARCODE in the ABAP program QCJPERFO is called. Then the simple barcode contained there (First page, Next page, Last page) is printed as local variable symbol.
Definition in the SAPscript form:
/: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
/: USING &PAGE&
/: USING &NEXTPAGE&
/: CHANGING &BARCODE&
/: ENDPERFORM
/
/ &BARCODE&
Coding of the calling ABAP program:
REPORT QCJPERFO.
FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
DATA: PAGNUM LIKE SY-TABIX, "page number
NEXTPAGE LIKE SY-TABIX. "number of next page
READ TABLE IN_PAR WITH KEY PAGE.
CHECK SY-SUBRC = 0.
PAGNUM = IN_PAR-VALUE.
READ TABLE IN_PAR WITH KEY NEXTPAGE.
CHECK SY-SUBRC = 0.
NEXTPAGE = IN_PAR-VALUE.
READ TABLE OUT_PAR WITH KEY BARCODE.
CHECK SY-SUBRC = 0.
IF PAGNUM = 1.
OUT_PAR-VALUE = |. "First page
ELSE.
OUT_PAR-VALUE = ||. "Next page
ENDIF.
IF NEXTPAGE = 0.
OUT_PAR-VALUE+2 = L. "Flag: last page
ENDIF.
MODIFY OUT_PAR INDEX SY-TABIX.
ENDFORM.
********************************
Regards
Vasu
‎2007 Oct 05 12:35 PM
Hi
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
<C1> &itab-field& </C1>.
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
Hope this link ll be useful..
http://help.sap.com/saphelp_nw04/helpdata/en/66/1b45c136639542a83663072a74a21c/content.htm
go through these links and cose u r previous threads,
http://www.sap-img.com/abap/questions-about-bar-code-printing-in-sap.htm
http://www.erpgenie.com/abap/smartforms.htm
http://sap.ittoolbox.com/groups/technical-functional/sap-basis/print-barcode-with-smartform-634396
http://sap.ittoolbox.com/groups/technical-functional/sap-dev/printing-barcode-733550
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.
Regards
ANJI