Skip to Content
author's profile photo Former Member
Former Member

barcode(problem with spaces) in smartforms

Hi SAP gurus,

I kinda new in barcode for smartforms and I am having a problem with it, because my barcode is splitting in two segments, it should only be one segment. what can be the remedy for my problem?,,

thanks in advance, i hope someone can help me with this. thanks.

regards to all.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2008 at 08:30 AM


    Can you tell me what value(example) you are passing for barcode display. Generally it will be displayed as single only.

    Try to condense the value before passing to barcode.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2008 at 08:37 AM


    Creating Bar code:

    --> 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.

    It will give an idea about barcode commands.

    SAP Barcodes

    -->Barcode solution consists of the following:

    barcode printer

    barcode reader

    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.

    for your reference check the below links:

    for smart, please check the below link:

    See the below program forbarcode in sapscript for your reference:

    DATA: BAR_CODE1(16) VALUE `ABC01230123A01'



    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



    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.




    Add a Write statement to prevent insertion of CR/LF into the barcode.


    Sample SAPSCRIPT

    Variable BAR_CODE1 contains the barcode data, including asterisks.

    The & is needed to avoid unwanted spaces or CR/LF characters

    /E LINE


    = &BAR_CODE1&


    pls reward points if helpful,


    Edited by: shylaja puchala on Jan 9, 2008 9:37 AM

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.