Now accepting guest editorial from SAP, Oracle, Workday and ServiceNow practitioners.Pitch a guide
The Sign-Off Table

Lesson 6 of 6

Testing ASNs and avoiding chargebacks

17 min

Listen to this lesson

0:00 / 10:09

An ASN test is not finished when the IDoc is green or when the 997 says "accepted". It is finished when someone has compared the 856 with what physically left the dock: the packages, their labels, their contents, the date and the paperwork. That comparison is what Great Lakes' receiving dock does every morning, and a supplier that does not do it first learns the results from chargebacks.

Where chargebacks come from

Chargeback reasonRoot cause in SAP or the mapPreventive check
ASN missingLAVA not determined (record, requirement, partner) or stuck IDocDaily count: deliveries issued for 17100001 vs DESADV IDocs vs 856s with 997
ASN lateGoods issue posted hours after departure; dispatch time not 4Compare goods issue time with the truck departure log
Quantity mismatchASN built before a short pick or splitTrigger at goods issue; test the 44-of-50 split
Label not in ASNRepack after the ASN; labels reprinted by handScan every label in the test and match it to MAN segments
Wrong PO or part numberE1EDL41 or KDMAT empty; map uses SAP numbersField check: PRF01 = customer PO, LIN BP = customer part
Wrong ship-toDepot code not converted back, or wrong partner on the deliveryN1*ST code matches the depot that ordered (GR04)

Great Lakes' compliance guide charges for each of these (amounts vary by partner); each has a root cause you can test for.

The 997 and what it proves

Every 856 and 855 Contoso sends gets a 997 functional acknowledgment from Great Lakes' translator. AK1 names the functional group being acknowledged (SH and its group control number), each AK2 one transaction set, AK3 and AK4 point to segment and element errors, AK5 gives the set's result (A accepted, E accepted with errors, R rejected) and AK9 the group's result (A, E, P partially accepted, R). The 997 is reconciled against the ISA, GS and ST control numbers Contoso sent; Theo's team checks it in the PO message monitor because SAP does not see it unless the middleware sends status back.

Reading the 997: a missing or rejected acknowledgment is a technical problem; an accepted one still needs a business check.
The Sign-Off Table · thesignofftable.com/academy/sap-edi-204

A 997 that says A means the 856 was valid X12 by the guide's syntax rules. It says nothing about whether the SSCCs match the labels or the quantities match the truck. Some partners send a separate application-level response after receiving; Great Lakes sends a receiving discrepancy report by email. That report, not the 997, is the business evidence.

The ASN test pack

Test caseExpected resultEvidence
Full delivery, two pallets and a cartonOne LAVA, one DESADV in 03, one 856 with 8 HL levels; 997 AIDoc number, 856 file, 997, label scans
Delivery split, 44 of 50 shippedASN for 44 at departure; second ASN for 6 with the new deliveryBoth deliveries, both 856s
Repack before goods issueASN carries the new SSCCs onlyLabel scans vs MAN segments
Goods issue reversed after departureCancellation 856 with BSN01 01, then a new originalBoth 856s, Great Lakes confirmation
Unpacked deliveryGoods issue blocked (packing mandatory)Error message on posting
Non-EDI customer deliveryNo LAVA output, no IDocDelivery output screen
Deliberate syntax error (CMQ copy of the map)997 with AK5 R and an AK3 pointing to the segmentRejected 997 in the PO monitor

Contoso's ASN test pack for Great Lakes. Every case runs through the real path: EWM in CMQ, XQ1, Great Lakes' test system.

Comparing the ASN with the physical shipment

  1. Pack and labelMarcus's team packs the test delivery at PK01 and prints labels as in production
  2. Scan the labelsRecord each SSCC from the physical labels, not from the screen
  3. Read the deliveryHUs and contents in the delivery after goods issue; packing list printed
  4. Read the 856From the PO monitor: HL tree, MAN, SN1, PRF, N1*ST, DTM*011
  5. ComparePackage count, SSCCs, quantity per package, PO, part numbers, ship-to and ship time
  6. Partner confirmsGreat Lakes' test system receives against the 856 and reports no discrepancy
The physical comparison: labels and packages first, then the delivery, then the 856, then the partner's receipt.
The Sign-Off Table · thesignofftable.com/academy/sap-edi-204

Two parts of that comparison are mechanical and worth automating: reading the delivery after goods issue (status, quantities per item, number of packages) and comparing it with the expected values for the test case. The physical label scan stays manual, because the point is to compare the system with the real world. Contoso keeps the expected values per test case in a table, so a rerun after every map change takes minutes.

What would you do?

Two days before go-live, all 856 tests show 997 A, but nobody has scanned physical labels; the comparison used SSCCs copied from the delivery screen. Priya is asked to sign off. What should she do?

Key points
  • Chargebacks come from missing, late, quantity, label, reference and ship-to errors; each has a testable root cause.
  • 997: AK5 is the transaction set result (A, E, R); AK9 the group result (A, E, P, R); AK3/AK4 locate errors. It proves syntax, not content.
  • Test the full delivery, splits, repacks, reversals, unpacked deliveries and a deliberate syntax error.
  • Compare physical label scans, the delivery after goods issue and the 856, package by package.
  • Sign-off needs partner confirmation of receipt against the ASN, not only acknowledgments.

Check your understanding · not graded

Lesson check

  1. 1. A 997 comes back with AK9 P. What does it mean?

  2. 2. Which evidence proves that SSCCs in the 856 match the packages?

  3. 3. Great Lakes charges for an ASN that arrived after the truck. Which root cause should Contoso check first?

  4. 4. Why does Contoso include a deliberate syntax error in the ASN test pack?