Gain a deeper knowledge of what European Article Numbers (EAN) and Universal Product Codes (UPC) mean. Save valuable time by understanding how you can configure EANs and UPCs in the system and the reports you can run to validate the correctness of the configuration.
Key Concept
A Universal Product Code is a 12-digit code that is used in the United States to identify and track products. A European Article Number is a 13-digit code that is used in Europe to identify and track products.
Universal Product Codes (UPCs) are 12-digit barcodes grocers in the US adopted when they needed to increase the speed and efficiency of processing goods. IT systems scan UPCs to identify a product and eliminate the need to manually key in the product code. Eventually, the UPC system became so popular in the US and Canada that the Uniform Code Council (UCC) was formed. Later, Europe developed a 13-digit barcode called the European Article Number (EAN), which was compliant with the UPC standard already established in the US.
In 2005, the UCC and EAN merged to become GS1. The UCC was renamed GS1 US and adopted all GS1 standards. Now, all US and Canadian companies are capable of scanning and processing both UPC and EAN codes at the point of sale. (The rest of the world uses EANs.)
I have implemented the barcode functionality for various clients. In this article I provide leading practices for implementation. I also explain how EANs and UPCs are configured in SAP systems.
Note
The configuration for EANs and UPCs is the same. The only difference between EANs and UPCs from a configuration perspective is that EANs use 13 digits whereas UPCs use 12 digits. Throughout the article I refer to EANs, but the article is applicable to UPCs as well.
How to Configure EANs in SAP Systems
To enable EAN use in your SAP system, you must first set them up. You must make the following settings to enable EAN configuration:
- Define number ranges for EANs
- Define prefixes for EANs
- Define attributes for EANs
- Recycle EANs (specific to retail)
- Define specific rules for recycling (retail)
To begin configuration, follow menu path Customizing > Logistics General >Material Master > Settings for Key Fields > International Article Numbers > Define Number Ranges for EANs/UPCs.
Step 1. Define Number Ranges for EANs
Number ranges are the range of numbers that you can assign as EAN codes. For example, if the interval is 10 to 1000, then the EANs are assigned from 10 to 1000 incrementally.
The ranges are driven by what EAN numbers can be purchased. Typically, companies have to purchase EAN ranges from GS1 organizations. These non-profit organizations are responsible for defining global standards for improving the efficiency of the supply chain across multiple industry sectors. They in turn allocate blocks of numbers or number ranges, which become EAN numbers. Without these numbers, the products will not be recognized at retail outlets as barcodes.
Once the number ranges are purchased, you can configure them as internal or external. If number ranges are set up as internal, the system automatically generates the EANs within the range specified. However, if it is set up as external, you need to manually enter the EAN number into the product master. To manually enter the EAN numbers into the product master, follow menu path Customizing> Logistics General > Material Master > Settings for Key Fields > International Article Numbers > Define Number Ranges for EAN/UPC. Click the Interval button and then enter the numbers (Figure 1).

Figure 1
EAN number ranges
Tip!
The length of the number range does not include the last digit (check digit). The last digit is called a check digit because it is literally used to check whether the digits in the EAN are in the correct sequence and represent the correct EAN number. The check digit algorithm (explained in a later section in the article) handles this process.
Step 2. Define Prefixes for EANs
The next step in configuring the EANs is setting up prefixes. Prefixes are the first two to three digits in an EAN. They represent the national GS1 member organization to which the manufacturer is registered. GS1 member organizations are responsible for administering the GS1 identification system (i.e., EANs) in its country (or assigned area). For example, if the prefix is 040, the GSI member organization is Germany and the manufacturer is registered in Germany.
To define prefixes, follow menu path Customizing > Logistics General > Material Master > Settings for Key Fields > International Article Numbers > Define Prefix of EAN/UPC (Figure 2). Here you define new entries by clicking the New Entries button or by selecting existing prefixes from the list. You use the prefixes in the next step, which is defining attributes.

Figure 2
Insert caption here.
Step 3. Define Attributes of EANs
EAN attributes are items such as the number range to be used, check digit algorithm, and prefixes. You set up attributes for EAN categories to tailor them for certain needs, such as for country-specific requirements. For example, a separate EAN category is defined for Japan as the EAN numbers ranges have to fall under a specific number range. Perishables is another example of an EAN category.
Defining EAN attributes helps identify the significance of the EAN number to the business users. The descriptions of the various EAN categories are available to the business users when they have to choose from multiple EAN categories. The system displays the EAN category description after the configuration steps for the material master in transaction MM01 are complete.
To define attributes, follow menu path Customizing > Logistics General > Material Master > Settings for Key Fields > International Article Numbers > Define Attributes for EANs/UPCs (Figure 3). The steps to define the attributes include setting up number range objects, check digits, prefixes, and additional intervals.

Figure 3
EAN categories
Number Range Objects
The number range object is a predefined value in the SAP system. It determines the intervals from which the EAN number is generated, as defined in step 1. The number range object can have a unique ID to represent the number ranges. For example, 02 can represent the number range 50000 to 99999.
Note
The number range object is different for regular EANs and perishable EANs. Perishable EANs are EAN numbers associated with food products that have a limited shelf life.
The number range objects help in defining what number ranges EANs can use for non-perishables (e.g., consumer electronics or apparel) and perishables. EANs always use the number range object EUROPARTNR, which is an SAP-defined object that controls number ranges. Similarly, perishables always use a different number range object (EANGEWICH5 or EANGEWICHT).
EANs also use internal and external number ranges. If you do not define an internal number range in this configuration step, you cannot enter the EAN type to draw the next free number from the number interval in the material master. The system checks manually entered EAN codes against the external number range interval.
The EAN category must be associated with the number range object to use the correct number range. Figure 4 shows an example of an EAN category, which you access by double-clicking an existing EAN category or by clicking the New Entries button in Figure 3.

Figure 4
EAN category
Check Digits
The check digit is the result of algorithmic calculation, which the system uses to detect errors in the EAN code. If the check digit is wrong, then the numbers must be generated again because the algorithm will calculate a different check digit. If the result of check digit calculation doesn’t match up with the last digit, then the EAN code is incorrect. The purpose of the check digit is to ensure that that the EAN code is not entered incorrectly.
Here is an example of calculating the check digit for the EAN-13 code. If the 12-digit EAN code is 205000000226, add all the odd position digits and multiply it by 3. Add all the even position digits. Sum the result. Subtract it from a higher multiple of 10. In this example, the sum of the odd position digit is 9 (2+5+0+0+0+2), which multiplied by 3 is 27. The sum of even position digits is 6 (0+0+0+0+0+0+6). The sum of 27+6 is 33. The closest higher multiple of 10 to 33 is 40. Therefore, the check digit is 7 (40-33 = 7) and the 13-digit EAN code is 2050000002267.
Use transaction SE38 with function module EAN_VERIFY_CHECKDIGIT to verify the check digit. Enter the EAN code including the check digit. If the EAN code is correct, then it returns a parameter CHECKDIGIT_OK = X. If it is incorrect, the system recommends the correct EAN with the check digit.
The function module is found using transaction code SE37. For example, say the EAN code is 205000000226. If the check digit given was 5, you enter 2050000002265 in the function module input. The function module calculates the check digit and arrives at the check digit 7. You would know then that the EAN number is incorrect.
Prefix
This is the prefix defined in step 2. Assign a prefix to the EAN category to specify that the number has to start with the prefix number range. The system checks if the prefix of the EAN code fits in any available prefix value. If you enter a defined restriction here, the code must fit and the corresponding prefix must be used. For example, if a perishable EAN category has been defined with a prefix of 45 and if you enter an EAN code starting with 40 in the material master, the system issues an error message automatically. This feature is only used for perishable goods.
Additional Intervals
You can also assign additional intervals to the EAN category (i.e., the EAN category can have more than one number range). The additional number ranges provide the flexibility to define more than one block of number ranges. The EAN numbers are then assigned in the sequence defined in additional intervals.
To assign additional intervals, follow menu path Logistics > Materials Management > Material Master > Material > Create (General) > Define EAN category >Additional Intervals (Figure 5).

Figure 5
Additional EAN intervals
Step 4. Recycle EANs (Specific to Retail)
The SAP system provides the flexibility to recycle the EANs. This functionality is useful because you can use the same EANs after a certain product is no longer available, such as seasonal retail products. Companies can save the cost of purchasing additional EANs by using the EANs again.
To define prefixes for recycled EANs, follow menu path Customizing > Logistics General > Material Master > Settings for Key Fields>International Article Numbers > Rules for Recycling EANs > Settings for Recycling EANs.
Set the Recycling indicator by clicking the check box to enable the EAN codes to be used after the date specified in the Recycling date indicator (Figure 6). The recycling date indicator can only be the archiving date if the business indicator is not set. Otherwise, you can use all the options (i.e. last order, last shipping, and last billing dates).

Figure 6
Recycling activation
For example, if the Business Document Date indicator is checked and the date is the last order date, then the baseline date will be the last order date. This along with the retention period (or archiving retention period) provides the reusability date for the material. The retention period is defined in months. Use the formula baseline date plus the retention period (i.e., archiving retention period) to get the reusable date.
For example, if the Business Document Date indicator is set and the date used is a last billing date and the retention period is 12, the system checks the last billing document used for each material. If the last billing date found is 01/01/2010 the EAN for the material is available for reuse on 01/01/2011.
Step 5. Define Specific Rules for Recycling (Retail/AFS)
In addition to step 4, you can also specify individual rules. The menu path for defining prefixes is Customizing > Logistics General > Material Master > Settings for Key Fields > International Article Numbers > Rules for Recycling EANs > Rules for Recyclability of EANs. To specify rules, drag and drop your choice from the left side of the screen to the right side of the screen (Figure 7).

Figure 7
Recycling rules by material type
The left side screen shows the available rules. The right side of the screen shows the selected rules for which you can enter specific values (e.g., the material type is FERT and the retention period is 12). The individual rules override the generic rule set in step 4.
Perform EAN Consistency Check
After you define the EANs, you should perform consistency checks. To do so, the following are available:
- EAN_CHECK program: This program can quickly tell if a given EAN fits in a specific EAN category or if the check digit is incorrect. You run this report by using transaction SE38 and entering an EAN value in the EAN/UPC field in the input screen (Figure 8).

Figure 8
EAN check report
- EAN_CUSTOMIZING report: This report can quickly tell you if a specific EAN category is unused or if there are overlapping number ranges, for example. You can run this report by using transaction code SE38 and choosing any of the options listed in the input screen (Figure 9).

Figure 9
EAN customizing report
Suresh Veeraraghavan
Suresh Veeraraghavan is a senior manager with Capgemini, a leading management and IT consulting firm. He works in the technology service group. He has 14 years of experience delivering SAP implementations in various capacities. Prior to joining Capgemini, he worked with Hewlett-Packard as a supply chain architect, managing and implementing SAP supply chain projects on a $26 billion platform. His expertise is in implementing best practices in supply chain management, specifically procure-to-pay and order-to-cash. He is a certified project management professional (PMP) and CPIM certified.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.