MOD 10 Check Digit for SSCC and GTIN
The Serial Shipping Container Code (SSCC) and Global Trade Item Number (GTIN) each contains a MOD 10 check digit as part of its data. This check digit can be calculated automatically using ConnectCode Barcode Fonts package.Serial Shipping Container Code (SSCC)
The diagram below shows an 18-digit SSCC (application identifier 00) barcode. The last digit '5' is the MOD 10 check digit required by the GS1 specifications. This check digit can be entered manually or calculated automatically by ConnectCode.
(00)123456789012345675
Global Trade Item Number (GTIN)
The diagram below shows a 14-digit GTIN(application identifier 01) barcode. The last digit '1' is the MOD 10 check digit required by the GS1 specifications. This check digit can be entered manually or calculated automatically by ConnectCode.
(00)12345678901231
Calculating the MOD 10 Check Digit using the Font Encoder
Serial Shipping Container Code (SSCC)The Font Encoder automatically generates the MOD 10 check digit if the application identifier 00 is entered. For example, if (00)12345678901234567 is entered to encode an UCCEAN (GS1 128) - SSCC barcode. The barcode for (00)123456789012345675 will be generated. The check digit '5' is automatically added to the barcode.
(00)12345678901231
The Font Encoder also automatically pads the data with 0 if the data for the SSCC barcode is less than 17 digits (excluding the 1-digit check digit). For example, if (00)12345678 is entered as the data. The barcode for (00)000000000123456784 will be generated.
It is important to note that the check digit calculation can be overridden by providing the check digit manually. For example, you can enter (00)123456789012345675 as the data for the Font Encoder to generate the barcode. In this case, the Encoder will use the digit '5' as the check digit.
Global Trade Item Number (GTIN)
The Font Encoder automatically generates the MOD 10 check digit if the application identifier 01 is entered. For example, if (01)1234567890123 is entered to encode an UCCEAN (GS1 128) - GTIN barcode. The barcode for (01)12345678901231 will be generated. The check digit '1' is automatically generated.
The Font Encoder also automatically pads the data with 0 if the data is less than 13 digits (excluding the 1-digit check digit). For example, if (01)12345678 is entered as the data. The barcode for (00) 00000123456784 will be generated.
It is important to note that the check digit calculation can be overridden by providing the check digit manually. For example, you can enter (01)12345678901231 as the data for the Font Encoder to generate the barcode. In this case, the Encoder will use the digit '1' as the check digit.
Calculating the MOD 10 Check Digit using Excel VBA
The Excel VBA formulas for SSCC and GTIN can be found in the Encoder.bas file that is bundled with ConnectCode. This file is located in the Resource sub directory where ConnectCode is installed.The VBA formulas can be imported into any Excel spreadsheet by following the steps in the section Using the Font with Excel.
Serial Shipping Container Code (SSCC)
If the data "12345678901234567" is in cell A1, entering "=SSCC(A1)" in cell B1 will give the result "123456789012345675". The additional digit '5' is the MOD 10 check digit.
The output of this function can be easily encoded as an UCCEAN (GS1 128) barcode. For example, the formula "=Encode_UCCEAN('(00)'&123456789012345675)" encodes a SSCC code as an UCCEAN (GS1 128) barcode.
If the data "12345678" is in cell A1, entering "=SSCC(A1)" in cell B1 will give the result "000000000123456784". Notice that additional '0's are padded in front of the data.
Global Trade Item Number (GTIN)
If the data "1234567890123" is in cell A1, entering "=GTIN(A1)" in cell B1 will give the result "12345678901231". The additional digit '1' is the MOD 10 check digit.
If the data "12345678" is in cell A1, entering "=GTIN(A1)" in cell B1 will give the result "00000123456784". The additional digit '4' is the MOD 10 check digit.
Using the MOD_10 formula
If the data "12345678901234567" is in cell A1, entering "=MOD_10(A1)" in cell B1 will give the result '5' which is the check digit.
Calculating the MOD 10 Check Digit in Crystal Reports
The SSCC and GTIN formulas for Crystal Reports can be found in the CR_Formula.txt file (in the Resource subdirectory). If you want to use the SSCC (or GTIN)formula, simply copy the code of SSCC (or GTIN) into the Formula Editor of Crystal Reports.Serial Shipping Container Code (SSCC)
The SSCC formula automatically calculates and adds a MOD 10 check digit to the input data. Look for the following lines as shown in the table below in the CR_Formula.txt file. Copy the code into the Formula Editor of Crystal Reports. If the input is changed to "12345678901234567", the formula will return the result "123456789012345675". The additional digit '5' is the MOD 10 check digit.
' SSCC Dim input as string 'Make changes to input or link it to a data source input = "12345678" . . . |
Global Trade Item Number (GTIN)
The GTIN formula automatically calculates and adds a MOD 10 check digit to the input data.
Look for the following lines as shown in the table below in the CR_Formula.txt file. Copy the code into the Formula Editor of Crystal Reports. If the input is changed to "12345678", the formula will return the result "00000123456784". The additional digit '4' is the MOD 10 check digit. Notice that additional '0's are padded in front of the data to make up the 14-digit GTIN.
' GTIN Dim input as string 'Make changes to input or link it to a data source input = "12345678" . . . |
MOD_10 -Generate the MOD 10 check digit
The Crystal Reports formulas also support the generation of the MOD 10 check digit independently. Look for the following lines in the table below in the CR_Formula.txt file. If the input is changed to "12345678901234567", the formula will return the result '5' which is a MOD 10 check digit. This MOD 10 check digit calculation works for any number of digits and is independent of SSCC or GTIN.
' MOD_10 Dim input as string 'Make changes to input or link it to a data source input = "00000000012345678" . . . |