EDI 940 to Excel Converter: Turn EDI 945 Warehouse Shipping Advice Files Into Spreadsheet Rows

An EDI 940 is the warehouse shipping order a depositor sends to a warehouse or third party logistics provider, and an EDI 945 is the warehouse shipping advice that comes back saying what actually left the dock. This page explains the W05 and W06 headers, the W01 and W12 detail loops, the status and reason codes that decide whether a short line is a backorder or a closed line, and how to flatten either document into Excel rows you can reconcile against the order. It also covers the pick tickets and shipment confirmations that arrive as PDFs instead.

PDF, JPG, PNG, BMP, HEIC, TIFF

Submit your purchase orders

X12 004010 and 005010
W05, W06 and W12 fields
Excel and CSV output
PDF pick tickets too

Why a Warehouse Shipping Advice Is So Easy to Read Wrong

A 945 looks like a simple confirmation, and that is exactly the problem. Three separate fields have to agree before you can say an order shipped complete, and the document is allowed to leave most of them out.

A 945 Can Legitimately Contain Only the Exceptions

W0601 is mandatory and it sets the reporting basis for the whole document. A value of X means exceptions only, so every line that shipped exactly as ordered is simply absent from the file. Read that as a full shipping advice and you will conclude most of the order never shipped. The mirror image is N, No Exceptions, a valid and nearly empty 945 that parsers report as broken when the warehouse is telling you everything went right.

A Complete Status Code Is Not a Complete Order

W1201 describes one line, not the shipment, and a line marked CC can sit in a file where other lines shorted or never appeared at all. The reliable completeness check is arithmetic: W1202 ordered against W1203 shipped, then the row total against W0301 in the W03 summary. Trusting the status code alone is how a short shipment gets invoiced as complete.

BP and CP Look Alike and Mean Opposite Things

Both say the line shipped short. BP is a partial with a backorder to follow, so the balance stays open. CP is a partial explicitly considered no backorder, so the balance will never arrive and the line should be closed. Treating every short line as a backorder leaves phantom open quantities on the books for months.

The Detail Loop Is W01 or W12, Never PO1

A 940 carries its lines in W01 inside an LX loop and a 945 carries them in W12. An 850 parser pointed at either one walks the file looking for PO1, finds nothing, and returns zero lines without raising an error. An empty sheet and a successful parse look identical from the outside.

What PurchaseOrders Does With Warehouse Paperwork, and What It Does Not Do

PurchaseOrders is a document extraction tool. It reads purchase orders, pick tickets, packing lists and shipment confirmations that arrive as PDFs, scans or email attachments and returns the header plus every line as clean columns. It is not an EDI translator: it does not connect to a VAN, it does not parse X12, and it does not generate a 940 or a 945. If your main 3PL sends true X12 files, keep the translator that handles them. This page exists because almost every operation runs both channels, and the document channel is where the manual keying and the missed short ships actually happen.

The Same Columns Your 945 Feed Produces

Order number, shipment reference and ship date, then one row per item with quantity ordered, quantity shipped, unit of measure and part number. Line those up with what your translator writes and both channels land in one variance report.

Quantities Come Out as Numbers, Not Text

Ordered and shipped quantities arrive as separate numeric columns, so the difference is a formula rather than a person reading two documents side by side.

Reads Any Warehouse Layout

No template to build per site and no coordinate mapping. A pick ticket from a co packer that looks nothing like your 3PL portal export still returns the same fields, which is the practical difference from a per partner EDI map.

Line Level, Not Just the Header

Every line comes back separately with its own quantity, lot reference where printed, and part number. A header only capture cannot tell you which line shorted.

Batch a Backlog in One Pass

Upload a folder of shipment confirmations and get one sheet, so a month of uninspected PDF paperwork becomes a report you can reconcile against your open orders.

Excel, CSV, JSON or API

Take the output in whatever shape the next step wants, including a JSON payload if the reconciliation runs in code rather than in a spreadsheet.

What the W05 header on an EDI 940 actually tells you

A 940 is the instruction a depositor sends to a warehouse or third party logistics provider: pick these items, pack them, and ship them to this address. Everything a parser needs to identify the order sits in one mandatory segment at the top, W05, and two of its eight elements are the ones that decide how you file the document.

ElementX12 elementNameRequirement
W0501473Order status codeMandatory
W0502285Depositor order numberMandatory
W0503324Purchase order numberOptional
W0504472Link sequence numberConditional
W0505474Master reference (link) numberConditional
W0506640Transaction type codeOptional
W0507306Action codeOptional
W050892Purchase order type codeOptional

Note which one is mandatory. The depositor order number in W0502 is required; the customer purchase order number in W0503 is not. That ordering is deliberate, because the warehouse works for the depositor and has no relationship with the end customer. It also means the join key between a 940 and the 945 that answers it is W0502, not the PO number, and a system that keys warehouse traffic on the customer PO will collide the moment one order ships in two releases.

All 14 W0501 order status codes

W0501 is X12 element 473 and it is a single character. It says whether this 940 is a new order, an amendment to one the warehouse already has, or a cancellation. Miss it and you can create a duplicate shipment out of a document that was meant to replace one.

CodeMeaning
NOriginal
RChange
FCancel
DDelete
CConfirmation
AInformational only
BBackorder original
EBackorder confirmation
GChanges to other than line items
LLine item replace
SFuture dated order
TResubmission
XSimulation exercise
ZMutually defined

Two of these are worth a rule in your code. A of Informational Only is not an instruction to ship anything, and warehouses that treat it as one create phantom picks. X of Simulation Exercise is a test document, and it has reached production more than once in the history of this transaction set because it validates perfectly.

Where a 940 keeps its line items

The detail loop of a 940 is LX wrapping W01, not PO1. This is the single reason an 850 parser aimed at a 940 returns an empty sheet and raises no error at all: it walks the file looking for a segment that is never going to be there and reports zero lines rather than a failure.

SegmentLevelWhat it carries
STHeaderTransaction set header and control number
W05HeaderShipping order identification, mandatory
N1 loopHeaderShip to, bill to and depositor parties, up to 10 repeats
N9HeaderExtended reference numbers, up to 10
G62HeaderShip dates and delivery dates, up to 10
NTEHeaderFree text special instructions
W66HeaderWarehouse carrier information
W09HeaderEquipment and temperature, the cold chain fields
LXDetailLine number, opens the detail loop
W01DetailLine item detail, quantity, unit of measure and product identifiers
G69DetailLine item description, up to 5 per line
W20DetailPacking detail for the line
W76SummaryTotal shipping order, optional
SESummaryTransaction set trailer

W76 is optional. That matters more than it sounds, because unlike CTT on an 850 or an 860 you cannot rely on a control total being present in a 940. If W76 is absent, and it legitimately can be, your only integrity check is your own count of LX loops against what your parser wrote.

The W06 header on a 945, and the one element that changes everything

A 945 is the warehouse answering the 940: here is what actually left the building. The header segment is W06 and it has twelve elements, but the first one governs how you are allowed to read every row underneath it.

ElementX12 elementNameRequirement
W0601514Reporting codeMandatory
W0602285Depositor order numberOptional
W0603373DateOptional
W0604145Shipment identification numberOptional
W0605531Agent shipment ID numberOptional
W0606324Purchase order numberOptional
W0607474Master reference (link) numberConditional
W0608472Link sequence numberConditional
W0609152Special handling codeOptional
W0610891Shipping date change reason codeOptional
W0611640Transaction type codeOptional
W0612306Action codeOptional

Everything except W0601 is optional in the standard, which in practice means your trading partner guide decides what you actually receive. Do not assume W0602 is populated just because it is the natural join key.

All 14 W0601 reporting codes, and the two that break naive parsers

W0601 is X12 element 514. It states the reporting basis of the document, and it is the most consequential single character in the whole 945.

CodeMeaning
FFull detail
XExceptions only
NNo exceptions
JOriginal transaction
AInventory adjustment, full detail
BBook transfer of inventory, full detail
CCustomer return, full detail
OPhysical inventory overage, full detail
SPhysical inventory shortage, full detail
PProduction receipt, full detail
RReplacement and charge
KSimulation exercise
YAutomated Manifest System master in bond participant
ZMutually defined

Here is the trap. A 945 with W0601 set to X carries only the lines that had an exception. Every line that shipped exactly as ordered is simply not in the file. Load that document as though it were a full shipping advice and you will conclude that most of the order never shipped, or, worse, overwrite an open order file with a partial extract. The mirror image is W0601 set to N, No Exceptions, which is a valid and complete 945 that can be almost empty because there is nothing to report. Parsers routinely flag an N document as broken when the warehouse is telling you the shipment went perfectly. Branch on W0601 before you read a single W12.

W12, the segment that carries what actually shipped

The detail loop of a 945 is LX wrapping W12. W12 is where the ordered quantity, the shipped quantity and the difference between them all live, in three separate elements that a lot of integrations map to one column.

ElementX12 elementNameRequirement
W1201368Shipment or order status codeMandatory
W1202380Quantity, the amount orderedOptional
W1203382Number of units shippedOptional
W1204383Quantity differenceOptional
W1205355Unit or basis for measurement codeOptional
W1206438UPC case codeConditional
W1207 and W1208235 and 234Product or service ID qualifier and IDConditional
W1209451Warehouse lot numberOptional
W1210 to W121581, 187, 188Two weight, weight qualifier and weight unit triplesConditional
W1216 to W1218438, 235, 234A second UPC case code and product ID pairConditional
W1219892Line item change reason codeOptional
W1220893Warehouse detail adjustment identifierOptional
W1221 and W1222235 and 234A third product ID qualifier and ID pairConditional

Two corrections to guidance that gets copied around the web. The change reason on a 945 line is W1219 and it uses X12 element 892, not W1212, and not element 371, which is the generic change reason code used elsewhere in X12. And W1204 is a quantity difference, nothing more. The standard does not say the missing units will follow later. Whether they will follow is decided by W1201, not by W1204.

The W1201 status codes that actually appear in warehouse traffic

W1201 is X12 element 368 and the full code list runs past a hundred values, most of which belong to order status reporting rather than to a warehouse shipping advice. These are the ones a 3PL feed realistically sends, and the ones worth translating into words before anyone in operations sees the sheet.

CodeMeaningWhat it implies for the missing units
CCShipment complete on dateNothing is missing on this line
CLCompleteNothing is missing on this line
PRPartial shipmentShort, and the code alone does not say whether the rest follows
BPShipment partial, back order to ship on dateShort, and the balance is expected to follow
CPPartial shipment on date, considered no backorderShort, and the balance will never arrive. Close the line.
BOBack orderedNothing shipped on this line yet
DSOut of stock conditionNothing shipped, and the reason is inventory
CUCancelled line itemThe line is dead, do not expect a later shipment
ICItem cancelledThe line is dead
CSShipment complete with substitutionComplete, but the product identifiers will not match the order
CMShipment complete with additional quantityOver shipped, W1203 exceeds W1202
SSSplit shipmentThis line arrives across more than one shipment
SDShipped damagedThe units left the building but a claim is coming
SHShipped on dateGeneric ship confirmation with no completeness claim

BP and CP are the pair to get right. They look almost identical in a spec and they mean opposite things to your open order file: BP leaves the balance open, CP closes it. A system that treats every short line as a backorder will carry phantom open quantities for months.

All 28 W1219 line item change reason codes

When a line ships short, W1219 is where the warehouse says why. It is optional, so it is often absent, but when your 3PL does populate it this is the field that turns a variance report into something you can act on with the supplier rather than just a list of numbers that did not match.

CodeMeaning
01Out of stock
02Equipment cut
03Booking location request
04On hold
05Order discrepancy
06Receiving location request
07Inventory discrepancy
08Material shortage
09Substitution
10Diverted item
11Warehouse, central customer pickup or common carrier loaded wrong product
12Carrier failed to deliver on time and damage free despite sufficient lead time
13Order requested more product than was allocated, or requested shipment outside the availability period
14Order requested more product than the vehicle could hold on weight, cube or pallet
15Improperly sized equipment, wrong configuration or missing temperature control
16Insufficient equipment space
17Discontinued item
20Late stock transfer
21Inadequate lead time
22Stock transfer not set up
23Item not stocked at shipping location
24Product withdrawn
25Addition requested by customer
26Bacteria clearance
27Customer age guidelines not met
ZZMutually defined

There is no code 18 or 19 in the published list, which surprises people writing validation and makes a contiguous range check reject valid files. Codes 01, 07, 08, 17 and 23 are the inventory family and together they cover most real short ships. Code 09, Substitution, is the one that needs a separate report, because the line looks fulfilled on quantity while the product that arrived is not the product that was ordered.

Flattening a 940 or a 945 into rows you can reconcile

The layout that works downstream is one row per detail loop, with the header values repeated on every row so the sheet stands on its own. For a 945 that means one row per W12 segment.

ColumnSource on a 940Source on a 945
Depositor order numberW0502W0602
Customer PO numberW0503 if presentW0606 if present
Document purposeW0501, translatedW0601, translated
Shipment IDNot presentW0604
Ship dateG62 with the agreed qualifierW0603
Line numberLX01LX01
Quantity orderedW0101W1202
Quantity shippedNot presentW1203
Quantity differenceNot presentW1204
Line statusNot presentW1201, translated
Short ship reasonNot presentW1219, translated
Unit of measureW0102W1205
Product identifiersW01 qualifier and ID pairsW1207 and W1208, plus repeats
Lot numberNot presentW1209

Then run two checks rather than one. Recompute W1202 minus W1203 per line and compare it to W1204, because a mismatch means the warehouse system and your own arithmetic disagree about what shipped. Then compare the sum of your W1203 values to W0301 in the W03 summary segment when it is present. W03 itself is optional, but if it is there the number of units shipped in W0301 is mandatory, so it is a genuine control total on the rows.

How 940 and 945 sit next to 943, 944, 947 and 856

The warehouse transaction sets pair off, and searching for one of them usually means you are about to meet its partner. Getting the direction right is most of the work.

Transaction setDirectionWhat it says
940 Warehouse shipping orderDepositor to warehouseShip this order
945 Warehouse shipping adviceWarehouse to depositorThis is what shipped
943 Warehouse stock transfer shipment adviceDepositor to warehouseStock is on its way in to you
944 Warehouse stock transfer receipt adviceWarehouse to depositorThe inbound stock arrived and here is the count
947 Warehouse inventory adjustment adviceWarehouse to depositorThe on hand quantity changed for a reason other than a shipment
846 Inventory inquiry or adviceEither directionCurrent on hand position
856 Advance ship noticeShipper to customerA shipment is on its way to the buyer

The 940 and 945 pair is the outbound flow and the 943 and 944 pair is the inbound flow, which is the answer to the question people usually mean when they ask about 940 versus 943. The relationship with the 856 is different again: a 945 and an 856 can describe the same physical truck from two vantage points, the warehouse reporting to its depositor and the depositor announcing to its customer. In plenty of 3PL setups the 856 is generated from the 945, so they are sequential rather than alternatives. Our reference on the EDI 856 advance ship notice covers the hierarchical loop that makes the ASN a different shape from everything on this page.

Where pick tickets and warehouse releases that are not EDI fit in

Almost no warehouse operation runs one channel. The 3PL on a VAN sends a 945 and the overflow warehouse, the co packer and the contract manufacturer email a PDF pick ticket, a packing list or a shipment confirmation. That second stream carries exactly the same commercial risk, and it is the stream where somebody keys quantities into a spreadsheet by hand at the end of the week. The useful move is to make both channels write the same columns: order number, shipment reference, ship date, then one row per line with quantity ordered, quantity shipped, unit of measure and part number. Agree that layout once and the EDI feed and the document feed land in the same variance report. That is the half of the problem PurchaseOrders solves, and it is deliberately the half an EDI translator does not. For the order that starts the whole exchange see the EDI 850 to Excel converter, for the supplier acknowledgment see the EDI 855 to Excel converter, and for amendments to an order already placed see the EDI 860 to Excel converter. If your files arrive as raw X12 and you need the general rules for delimiters and envelopes first, start with the EDI to Excel converter guide, and if the acknowledgment layer is where things go quiet, our reference on EDI 997 error codes explains why a clean 997 is a syntax pass rather than a business confirmation.

Every Route for Turning an EDI 940 or 945 into a Spreadsheet

Which one is right depends on whether this is one file you need to read today or a channel you have to reconcile every week.

Route Best for What it takes Watch out for
EDI translator export Ongoing 940 and 945 volume Your existing translator writing a CSV or a database drop Many translators map warehouse sets with an order profile, which looks for PO1 and returns nothing when the detail loop is W01 or W12
3PL portal download Occasional lookups on one provider Logging in and exporting the shipment report The export layout is the provider decision, so two 3PLs give you two different sheets to normalize
Parse it yourself A few predictable warehouses Split on the terminator and the element separator, branch on W0601, then walk the LX and W12 loops The W0601 branch and the BP against CP distinction are the parts that have to be right, not the splitting
Excel text to columns Almost nothing Data then Text to Columns using the element separator Produces one wide row per segment rather than one row per line, so the W12 loop never becomes rows
PurchaseOrders Pick tickets and confirmations that arrive as PDFs rather than X12 Uploading the document It reads documents, not X12, so it is the other channel rather than a replacement for the translator

From a Warehouse Document to Spreadsheet Rows in 3 Steps

This is the path for the shipments that do not arrive as X12, which for most operations is every warehouse except the largest one.

1

Upload the Pick Ticket or Confirmation

Drop in the PDF, the scan or the email attachment. Multi page packing lists and a batch of mixed warehouses are both fine.

Tip: Start with the warehouse that shorts most often, because that is where the variance is.

2

Check the Header and Lines On Screen

Order number, shipment reference, dates and every line come back together, so you can see a short quantity before it is invoiced as complete.

Tip: Compare your line count to the order the same way W0301 checks a 945.

3

Export to Excel, CSV, JSON or the API

Take the columns in whatever shape the variance report wants, matching the layout your EDI drop already writes so both channels merge cleanly.

Tip: Keep a shipment reference column so a split delivery never collapses into one row.

Why Shipping Desks Run Both Channels Into One Sheet

PDF
Any source document
CSV
Import-ready output
Any
Warehouse layout

Security & Privacy

  • Bank-grade TLS encryption in transit
  • Files auto-deleted after processing
  • Your PO data is never sold or shared
  • US-based cloud infrastructure

EDI 940 and EDI 945 to Excel: Common Questions

An EDI 940 is the warehouse shipping order, the X12 transaction a depositor sends to a warehouse or third party logistics provider instructing it to pick, pack and ship a specific order. Its mandatory header is W05 and its line items sit in W01 segments inside an LX loop. The warehouse answers it with an EDI 945 once the shipment leaves.

An EDI 945 is the warehouse shipping advice, the document the warehouse sends back to the depositor reporting what actually shipped against a 940. Its header is W06 and each line sits in a W12 segment carrying the quantity ordered, the quantity shipped, the difference and a status code.

Split the file on its segment terminator and each segment on its element separator, read W0501 on a 940 or W0601 on a 945 to learn what kind of document you are holding, then walk the LX loop writing one row per W01 or W12 segment with the header values repeated on every row. Translate the status and reason codes as you go rather than storing raw values.

The 940 is the instruction and the 945 is the report. A 940 travels from the depositor to the warehouse and says ship this order. A 945 travels back from the warehouse to the depositor and says this is what shipped, line by line, including anything that shipped short or not at all.

They point in opposite directions through the warehouse. The 940 and 945 pair handles outbound shipments leaving the warehouse to a customer. The 943 warehouse stock transfer shipment advice and the 944 receipt advice handle inbound stock arriving at the warehouse, with the 943 announcing it and the 944 confirming the count on arrival.

W1201 is the shipment or order status code, X12 element 368, and it is mandatory on every W12 segment. It says what happened to that line: CC for complete, PR for a partial, BP for a partial with a backorder to follow, CP for a partial with no backorder, BO for fully backordered and CU for a cancelled line.

In W1219, the line item change reason code, which uses X12 element 892. It is optional so it is often absent, but when populated it carries values like 01 for out of stock, 08 for material shortage, 09 for a substitution and 17 for a discontinued item. It is W1219 rather than W1212, which is a weight unit code.

No. A 945 goes from the warehouse to the depositor that owns the goods, and an 856 advance ship notice goes from the shipper to the receiving customer. They can describe the same truck from two vantage points, and in many 3PL setups the 856 is generated from the 945, so they are sequential rather than alternatives.

No. PurchaseOrders reads purchase orders, pick tickets and shipment confirmations that arrive as PDFs, scans or email attachments and returns the header and line items as columns. True X12 files still need an EDI translator. The two are complementary, because most operations receive X12 from their main 3PL and documents from everyone else.