Skip to Content
avatar image
Former Member

UCC/EAN 128 barcode in smartform

Hi,

I have problem with barcode UCC/EAN 128 in smartform. I don't know how to make this barcode.

I tried to make it so :

- make value for barcode

- add FNC1 value (>8) at the begining of barcode value

- use barcode 128 (defined in SE73 - code 128)

It didn't work with other software and barcode readers as UCC/EAN 128.

Any idea ?

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Jan 03, 2009 at 03:43 AM

    1. Define Bar Code using tcode SE73 ( Printer Bar Codes).

    2. Use Bar Code Character Format in a Style and define the Bar Code created in step 1.

    3. Use the Character Format in a text node from the above style, that has variable to be represented as a bar code.

    Edited by: SBX on Jan 3, 2009 4:54 AM

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 03, 2009 at 04:41 AM

    smartforms-barcode

    /people/javier.perez-ullivarri/blog/2007/12/03/create-barcode-in-abap-conversion-to-pdf

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      I used >;>8 for the FNC1 character & in b/w as need I used >8. With this modifications, it worked fine with the UCC/EAN 128 barcode.

      Check the below note:

      A SSCC label is printed with a EAN128 barcode and the "New Barcode Technology for Smart Forms" (see note 645158). The barcode string contains not only digits but also characters. How can automatic switching between Code128 character sets B and C be implemented for the barcode label?

      Other terms

      Barcode, EAN128, Code128

      Reason and Prerequisites

      The Code128 barcode mode N used for the SSCC barcode in the SSCC labels requires the application program to switch between Code128 charset B and C via invocation codes. But this switching is not available in the LO-HU customizing.

      Solution

      Before the barcode is output in the Smart Form, create a program node in the Smart Form where you add ABAP code which will scan the barcode string and insert ">6" when a switch from charset C to B is required and ">5" when a switch from B to C is required. This way a barcode is created which is narrow (because charset C is used when possible) and also EAN128-compliant.

      The ABAP code must take as input the barcode string from the application. This barcode string must not contain

      - FNC1 (>8) at the start (the ABAP code adds this first FNC1)

      - any invocation codes other than FNC1 in the middle as field delimiter

      Example:

      Input string is:

      02093107040426973760>8400S95125123

      Output string is:

      >;>802093107040426973760>840>60S>595125123

      The sample ABAP code for the charset switching is attached to this note. It needs to be adapted with the correct input and output field from your Smart Form.

      The ABAP code attached with the note is

      data infield(80).

      data outfield(80).

      data mode type c.

      data ofs type i.

      data len type i. data restlen type i.

      data c2(2) type c.

      data c4(4) type c.

      data 2digits type c.

      data 4digits type c.

      infield = xxxx. "<<<< replace xxxx with your input field that has the barcode string

      • determine initial mode

      len = strlen( infield ).

      ofs = 0.

      restlen = len - ofs.

      mode = 'B'.

      if restlen > 3.

      clear 4digits.

      if infield(4) co '1234567890'.

      4digits = 'X'.

      endif.

      if 4digits = 'X'.

      mode = 'C'.

      else.

      mode = 'B'.

      endif.

      endif.

      case mode.

      when 'C'.

      outfield = '>;>8'. "START C+FNC1

      when 'B'.

      outfield = '>6>8'. "START B+FNC1

      endcase.

      len = strlen( infield ).

      while ofs < len.

      restlen = len - ofs.

      • do we have an FNC1 ? copy it.

      if restlen > 1.

      c2 = infield+ofs(2).

      if c2(1) = '>'.

      concatenate outfield c2 into outfield.

      add 2 to ofs.

      endif.

      endif.

      restlen = len - ofs.

      case mode.

      when 'C'.

      • do we have 2 following digits?

      clear 2digits.

      if restlen > 1.

      c2 = infield+ofs(2).

      if c2 co '0123456789'.

      2digits = 'X'.

      endif.

      endif.

      if 2digits = 'X'.

      concatenate outfield c2 into outfield.

      add 2 to ofs.

      else.

      concatenate outfield '>6' into outfield.

      mode = 'B'.

      endif.

      when 'B'.

      • do we have 4 following digits?

      clear 4digits.

      if restlen > 3.

      c4 = infield+ofs(4).

      if c4 co '0123456789'.

      4digits = 'X'.

      endif.

      endif.

      if 4digits = 'X'.

      concatenate outfield '>5' c4 into outfield.

      add 4 to ofs.

      mode = 'C'.

      else.

      if infield+ofs(1) = '>' and restlen > 1. "do not copy

      else.

      concatenate outfield infield+ofs(1) into outfield.

      add 1 to ofs.

      endif.

      endif.

      endcase.

      endwhile.

      yyyy = outfield. ""<<<< replace yyyy with your output field that will print the barcode

      Thanks,

      Sangeetha K

  • avatar image
    Former Member
    Mar 24, 2009 at 10:50 AM

    unanswered

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 26, 2009 at 12:41 PM

    Hi ,

    While creating new system barcode form existing barcode say BC_039, system will ask for crete with new technology or create with old technology, in that case you have to select new technology and specify barcode terminology as EAN128. then specify other parameters like modular height and width as per your requirement.

    first define style for smartform and then use this system barcode in character format. Again by using this character format, you can able to print element whatever you want in smartform.

    Also before printing this newly developed barcode,please confirm with basis that you use correct printer which is already barcode configured.

    Hope this works for you.........

    Thanks..........

    Add comment
    10|10000 characters needed characters exceeded