‎2010 Aug 31 7:30 AM
Dear all
I have an old program where we print forms on a matrix printer.
we use simply WRITE: /48 kna1-name1.
Now I have to add a barcode. Is this possible without using Sapscript or Smartforms?
Herbert
‎2010 Aug 31 7:40 AM
Hi Herbert,
Printing Barcodes with ABAP or SAPSCRIPT
hope u will get some idea.
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:/
Regards
Amarnath S
‎2010 Aug 31 7:40 AM
Hi Herbert,
Printing Barcodes with ABAP or SAPSCRIPT
hope u will get some idea.
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:/
Regards
Amarnath S
‎2010 Aug 31 12:29 PM
I tried this, but it prints 'ABC01230123A01' and not a barcode
Herbert
Edited by: Herbert Schlup on Aug 31, 2010 1:29 PM
‎2011 Jul 11 2:58 PM
HI,
i'm facing the same problem, do you know how to resolve this issue, i did what they suggest but it doesnt work.
thank you for you help,
‎2010 Aug 31 8:30 AM
Hi,
please go through this ..
Printing Barcodes with ABAP
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:/
Regards,