Ean 13

maikeljmaikelj Member Posts: 50
edited 2008-02-04 in Navision Financials
Hi everyone,

Can anybody tell me where I can find some code to calculate
an EAN13 code?

With kind regards,

Maikel

Comments

  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    You'll find the routine in the C/SIDE on-line help (lookup STRCHECKSUM):
    The STRCHECKSUM function can be used to calculate checksums for 13- and 8-digit EAN (European Article Number) and EAN compatible bar codes such as UPC (Universal Product Code) or JAN (Japanese Article Number).

    A 13-digit EAN code has this format:

    The system uses the 12 digits in positions 13 to 2 to calculate the checksum at position 1.

    Starting with position 2, the system totals all even values. It then multiplies the result by three. This value is called Even.

    Starting with position 3, the system totals all odd values. The result is called Odd.

    Total = Even + Odd.

    The modulus 10 checksum is then: (10 - Total MOD 10) MOD 10.
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • maikeljmaikelj Member Posts: 50
    Thanks for the formula Luc.

    Maikel
  • kakrupakakrupa Member Posts: 2
    You will find a conprehensive info at http://www.ean.be
    Regards,
    kakrupa
  • bolkobolko Member Posts: 13
    HI,
    I'LL ABLE TO asigne 12 DIGITS UPC to all my items USING No. Series FUNTION , but I Need to generate the 13 digit "UPC Check Digit"
    Any Idea how to doit?

    Thanks
    Bolko de Pawlikowski
  • bolkobolko Member Posts: 13
    You'll find the routine in the C/SIDE on-line help (lookup STRCHECKSUM):
    The STRCHECKSUM function can be used to calculate checksums for 13- and 8-digit EAN (European Article Number) and EAN compatible bar codes such as UPC (Universal Product Code) or JAN (Japanese Article Number).

    A 13-digit EAN code has this format:

    The system uses the 12 digits in positions 13 to 2 to calculate the checksum at position 1.

    Starting with position 2, the system totals all even values. It then multiplies the result by three. This value is called Even.

    Starting with position 3, the system totals all odd values. The result is called Odd.

    Total = Even + Odd.

    The modulus 10 checksum is then: (10 - Total MOD 10) MOD 10.
  • SavatageSavatage Member Posts: 7,142
    I know I can calculate the check digit of a 12 digit UPC with an excel formula if I enter the first 11
    A1=first 6
    b1=next 5

    =IF(OR($A1="",$B1="")=TRUE,"",CEILING((SUMPRODUCT(MID(($A1&$B1),{1,3,5,7,9,11},1)*1)*3)+SUMPRODUCT(MID(($A1&$B1),{2,4,6,8,10},1)*1),10)-((SUMPRODUCT(MID(($A1&$B1),{1,3,5,7,9,11},1)*1)*3)+SUMPRODUCT(MID(($A1&$B1),{2,4,6,8,10},1)*1)))

    - I'm wondering if you google it that the calculation for 13 digits exist.
  • bolkobolko Member Posts: 13
    EXAMPLE
    081184501000 (NUMBER WITHOUT CHECK DIGIT)

    #1. YOU HAVE TO ADD THE PAIR POSITIONS
    8+1+4+0+0=13

    Multply by 3

    12*3=39

    #2. YOU HAVE TO ADD THE IMPAIR:
    0+1+8+5+1+0=15 ,

    Sum #1+#2 : 39+15=54

    The check digit is the lower number need it to add to make 54 multiple of 10 in this case 6


    Result: 0811845010006

    Sorry for my english






    Savatage wrote:
    I know I can calculate the check digit of a 12 digit UPC with an excel formula if I enter the first 11
    A1=first 6
    b1=next 5

    =IF(OR($A1="",$B1="")=TRUE,"",CEILING((SUMPRODUCT(MID(($A1&$B1),{1,3,5,7,9,11},1)*1)*3)+SUMPRODUCT(MID(($A1&$B1),{2,4,6,8,10},1)*1),10)-((SUMPRODUCT(MID(($A1&$B1),{1,3,5,7,9,11},1)*1)*3)+SUMPRODUCT(MID(($A1&$B1),{2,4,6,8,10},1)*1)))

    - I'm wondering if you google it that the calculation for 13 digits exist.
Sign In or Register to comment.