Code list

Unit of measure codes for cXML and OCI catalogues

cXML’s UnitOfMeasure element expects a code from UN/CEFACT Recommendation 20. These are the codes catalogues use most, what each one means, and where SAP’s OCI codes differ.

Where it fits

  1. Each catalogue line carries a unit: UnitOfMeasure in a cXML PunchOutOrderMessage, OrderRequest, ship notice or invoice, and NEW_ITEM-UNIT in OCI.
  2. cXML buyers expect codes from UN/CEFACT Recommendation 20. Recommendation 20 marks some familiar packaging codes, such as BX and PK, as deleted and points to Recommendation 21 for packaging, though many buyers’ unit tables still contain them.
  3. The buyer’s procurement system maps the code to its own unit list. A code it does not know fails the cart line or the order, so the practical list is the intersection of Recommendation 20 and what the buyer has configured.
  4. The same unit must then be used on the order, the ship notice and the invoice for a line, or quantity matching fails.

The unit on a cXML cart line. The price is per unit of measure.

<ItemIn quantity="25">
  <ItemID><SupplierPartID>NW-CABLE-3G15</SupplierPartID></ItemID>
  <ItemDetail>
    <UnitPrice><Money currency="EUR">1.84</Money></UnitPrice>
    <Description xml:lang="en">Installation cable 3G1.5, sold by the metre</Description>
    <UnitOfMeasure>MTR</UnitOfMeasure>
    <Classification domain="UNSPSC">26121600</Classification>
  </ItemDetail>
</ItemIn>

The codes

CodeUsageMeaning
EAOptionalEach. A unit of count for items regarded as separate units.
C62OptionalOne. The Recommendation 20 code for a dimensionless unit, used by many systems for “piece”.
H87OptionalPiece. A unit of count for single items, articles or exemplars.
PCEConditionalPiece in SAP’s ISO unit table, used in OCI NEW_ITEM-UNIT. It is not a Recommendation 20 code; in cXML use C62, H87 or EA.
SETOptionalSet: a number of objects grouped together.
PROptionalPair.
DZNOptionalDozen: units in multiples of 12.
BXConditionalBox. Marked deleted in Recommendation 20, which refers packaging to Recommendation 21, but still found in many buyers’ unit tables. Check the buyer’s list before using it.
PKConditionalPack (package). Same status as BX: marked deleted in Recommendation 20, but still found in many buyers’ unit tables.
KGMOptionalKilogram.
GRMOptionalGram.
MTROptionalMetre.
CMTOptionalCentimetre.
MMTOptionalMillimetre.
MTKOptionalSquare metre.
LTROptionalLitre.
MLTOptionalMillilitre.
HUROptionalHour. Used for labour and services.
E48OptionalService unit: a defined period, property, facility or utility of supply.
LSOptionalLump sum: a whole or complete monetary amount, for fixed-price services.

Mistakes that get it rejected

Internal abbreviationsPCS, pc, Stk and EACH are not Recommendation 20 codes. Map every internal unit to a code before it leaves your system.
CaseCodes are upper case. ea or Kgm may not match the buyer’s table.
Pack price with a piece unitSelling a box of 100 at the box price but sending C62 tells the buyer each glove costs the box price. The unit must describe what one unit of the price buys.
Different code per documentChanging from BX on the order to EA on the invoice breaks quantity matching even when the goods are the same.

Have a Unit of measure codes that a buyer rejected? Paste it into the free cXML and OCI tester; it checks structure in your browser.

Unit of measure codes questions

Should I use EA, C62 or H87 for single items?

All three are valid Recommendation 20 codes for counting single items, and buyers differ in which they have configured. Use whichever the buyer’s unit list contains, and keep it the same on the cart, order, ship notice and invoice.

Why does SAP want PCE when cXML uses C62?

SAP maps OCI units through its own table of ISO codes, in which piece is PCE. cXML buyers expect Recommendation 20 codes. A supplier serving both needs a separate mapping for each protocol.

Where is the full list?

UN/CEFACT publishes Recommendation 20 (Codes for Units of Measure Used in International Trade) on the UNECE website. It has well over a thousand codes; catalogues use a small fraction of them.

Rather not hand-build this?

The free PunchOut shop handles the Unit of measure codes side of the round trip for you: upload your catalogue from Excel, test a cXML or OCI round trip and invite your buyer. Free until your buyer goes live.

Start free Send us the document