Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

sap scripts(creating barcode)

Former Member
0 Kudos

hi experts i got one requirement creating barcode in sap-scrits. plz give me the steps how to create barcode in sap-scripts according to my requirement........

This is my requirement........

Code 39 Bar Code Specification:

HAL’s new warehouse will conform to Code 39 bar code specification. Code 39 (sometimes called Code 3 from 9) is a discrete barcode. This means that a fixed pattern of bars represents a single character.

The Code 39 character set includes the digits 0-9, the letters A-Z (upper case only), and the following symbols: space, minus , plus , period (.), dollar sign ($), slash (/), and percent (%). A special start/stop character is placed at the beginning and end of each barcode. The barcode may be of any length, up to and including 20 characters.

Each character consists of 9 elements: 5 bars and 4 spaces. Each character includes 3 wide and 6 narrow elements. Characters are separated by an inter-character gap which is the same width as a narrow bar. The ratio of wide:narrow bar width may be in the range of 1.8 to 3.4. Barcodes with a narrow bar width of less than 0.020 inches (0.508mm) should have a ratio of at least 2.5. A ratio of 3.0 is recommended. Every Code 39 barcode should be preceded and followed by a quiet zone the width of at least 10 narrow bars.

Code 39 does not require a checksum, although a modulo 43 check digit may be appended for increased data integrity (the Mod 43 checksum is seldom used). Code 39 is just about the only type of barcode in common use that does not require a checksum. This makes it especially attractive for applications where it is inconvenient, difficult, or impossible to perform calculations each time a barcode is printed. For example, when performing a word processor merge operation there is generally no easy way to calculated a checksum if one of the merge data fields is to be barcoded. With Code 39, however, no checksum is needed; the merge template document must simply add a fixed asterisk (*) before and after the data and print the field using a Code 39 barcode font.

Extended Code 39:

Extended Code 39 was developed to provide a means of encoding additional characters that are not normally part of the Code 39 character set (lower case characters and symbols). Extended characters are encoded by a pair of normal Code 39 characters.

Tips:

Code 39 can be read by just about every scanner on the market. It is widely used for in-house solutions; that is, applications where the barcodes will be used internally. It is also used for transferring data between companies. A useful technique to help protect against errors is to include a prefix character in every barcode. For example, product identification numbers might begin with a "P" while quantities might begin with a "Q". If the operator is asked to scan a part number, the scanner can check for the presence of the "P" prefix and immediately reject the scan if it is not there.

Bar Code applications:

All primary units, accessories, parts or components must have a “Code 39” barcode with the following information:

a) Part Number

b) Quantity

c) Manufacturing Number (aka: Serial Number)

d) Date of Manufacture *

  • Note: For any product that has an expiration date, the expiration date must be substituted for “production date”

4. Printing resolution:

203 dpi (8 dpm)

5. Print size:

Approximately 2.5” x 2.5” (63.5mm x 63.5mm ) *Note: Can be altered to fit carton size appropriately.

plz see this requirement and give me the solution for this..............

review the points if any one help on this

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Srikanth,

I cannot answer it fully, but please check the transaction SE73, where in the initial screen u'll have an option of system barcodes and printer bar codes. U can upload new barcodes also, with this transaction. The bottom push-button i think is used for this purpose.

Copying an existing barcode and creating a new one is what i have done for my requirement. This can be done using this transaction. Go in change mode even u can create a new bar code also. Let me know if further details are required on this.

In SAP Script you can use do it easily the only thing you need to do is specify the bar code that has been created by you in a Character Format. Create a Character Format there u'll have an option to specify bar code and u can specify it.

Please let me know if further details are required from my side.

Regards,

Goutham.

4 REPLIES 4

Former Member
0 Kudos

this question is not answered ,,,,,,,,,,plz help me any one.

Former Member
0 Kudos

Hi Srikanth,

I cannot answer it fully, but please check the transaction SE73, where in the initial screen u'll have an option of system barcodes and printer bar codes. U can upload new barcodes also, with this transaction. The bottom push-button i think is used for this purpose.

Copying an existing barcode and creating a new one is what i have done for my requirement. This can be done using this transaction. Go in change mode even u can create a new bar code also. Let me know if further details are required on this.

In SAP Script you can use do it easily the only thing you need to do is specify the bar code that has been created by you in a Character Format. Create a Character Format there u'll have an option to specify bar code and u can specify it.

Please let me know if further details are required from my side.

Regards,

Goutham.

Former Member
0 Kudos

hi

good

herewith i am giving the code to print the barcode in sapscript , hope this ll help you to solve your problem

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

thanks

mrutyun^

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Create a character element.In that specify the required barcode.Use the character in text element to print bar code.

Kindly reward points if it helps.