Lesson 6 of 6
Testing ASNs and avoiding chargebacks
17 min
Listen to this lesson
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 reason | Root cause in SAP or the map | Preventive check |
|---|---|---|
| ASN missing | LAVA not determined (record, requirement, partner) or stuck IDoc | Daily count: deliveries issued for 17100001 vs DESADV IDocs vs 856s with 997 |
| ASN late | Goods issue posted hours after departure; dispatch time not 4 | Compare goods issue time with the truck departure log |
| Quantity mismatch | ASN built before a short pick or split | Trigger at goods issue; test the 44-of-50 split |
| Label not in ASN | Repack after the ASN; labels reprinted by hand | Scan every label in the test and match it to MAN segments |
| Wrong PO or part number | E1EDL41 or KDMAT empty; map uses SAP numbers | Field check: PRF01 = customer PO, LIN BP = customer part |
| Wrong ship-to | Depot code not converted back, or wrong partner on the delivery | N1*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.
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 case | Expected result | Evidence |
|---|---|---|
| Full delivery, two pallets and a carton | One LAVA, one DESADV in 03, one 856 with 8 HL levels; 997 A | IDoc number, 856 file, 997, label scans |
| Delivery split, 44 of 50 shipped | ASN for 44 at departure; second ASN for 6 with the new delivery | Both deliveries, both 856s |
| Repack before goods issue | ASN carries the new SSCCs only | Label scans vs MAN segments |
| Goods issue reversed after departure | Cancellation 856 with BSN01 01, then a new original | Both 856s, Great Lakes confirmation |
| Unpacked delivery | Goods issue blocked (packing mandatory) | Error message on posting |
| Non-EDI customer delivery | No LAVA output, no IDoc | Delivery output screen |
| Deliberate syntax error (CMQ copy of the map) | 997 with AK5 R and an AK3 pointing to the segment | Rejected 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
- Pack and labelMarcus's team packs the test delivery at PK01 and prints labels as in production
- Scan the labelsRecord each SSCC from the physical labels, not from the screen
- Read the deliveryHUs and contents in the delivery after goods issue; packing list printed
- Read the 856From the PO monitor: HL tree, MAN, SN1, PRF, N1*ST, DTM*011
- ComparePackage count, SSCCs, quantity per package, PO, part numbers, ship-to and ship time
- Partner confirmsGreat Lakes' test system receives against the 856 and reports no discrepancy
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?
- 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. A 997 comes back with AK9 P. What does it mean?
2. Which evidence proves that SSCCs in the 856 match the packages?
3. Great Lakes charges for an ASN that arrived after the truck. Which root cause should Contoso check first?
4. Why does Contoso include a deliberate syntax error in the ASN test pack?