cancel
Showing results for 
Search instead for 
Did you mean: 

how to generate barcode name in scripts

Former Member
0 Kudos

hi,

how to generate barcode name in scripts.what is the procedure tell me brief with example.what is the use of barcodes

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Krishna,

some users wants to print numbers or document numbers in bar code. Bar code is nothing but system under stand language, for this some 3rd party tools should be neccesary. Coming to sap we have one structure TLINE. move values manually into that structure and by using some logic we can print the bar coding.

CLEAR temp.

barcode = signi.

barcode_org = signi.

CLEAR temp1.

barcode_vb = vbeln_bar.

b = STRLEN( barcode_vb ).

IF b < 17.

i = ( 17 - b ).

DO i TIMES.

CONCATENATE '0' temp1 INTO temp1.

ENDDO.

CONCATENATE temp1 barcode_vb INTO barcode_vb.

ENDIF.

CLEAR temp1.

MOVE barcode+4(6) TO temp1.

REPLACE ALL OCCURRENCES OF c_hyphen IN barcode_vb WITH space.

CONDENSE barcode_vb NO-GAPS.

a = STRLEN( barcode ).

IF a < 10.

i = ( 10 - a ).

DO i TIMES.

CONCATENATE '0' temp INTO temp.

ENDDO.

CONCATENATE temp barcode INTO barcode.

ENDIF.

CLEAR temp.

MOVE barcode+4(6) TO temp.

REPLACE ALL OCCURRENCES OF c_hyphen IN barcode WITH space.

CONDENSE barcode NO-GAPS.

ENDIF.

Hope this helps you. Reply for queries, shall post the updates.

Regards.

Kumar

Former Member
0 Kudos

Hi,

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.

Check out the link for Adding Your Own Bar Code:-

http://help.sap.com/saphelp_nw04/helpdata/en/d9/4a94fc51ea11d189570000e829fbbd/content.htm

Check out the link for barcodes in SAP

http://help.sap.com/saphelp_nw04/helpdata/en/68/4a0d5b74110d44b1b88d9b6aa1315b/content.htm

Hope this helps.

Regards,

Richa