SeanHoppe.com > CLEO Tips > Cleo EDI Integrator EDI 846 - Mapping Zero to QTY02 Element
EDI 846 - Mapping Zero to QTY02 Element
3rd July 2019
in Cleo EDI Integrator, it is almost IMPOSSIBLE to map a 0 (zero) to a numeric element, in an outbound EDI (x12 / EDIFACT) document
The outbound EDI 846 is a great example of where we need to map Zero (’0′) to QTY02 element. In the example below, we will show how
- send a positive quantity on hand
- a zero quantity on hand
1. QTY segment
We create duplicate QTY segments for each of the qualifiers – 29 and 33
Note: Although this is an outbound document, we still qualify the segments, to help us identify each QTY segment![](https://64.media.tumblr.com/83e03c338579fec7a655823a03ea116f/5310405722a36a8b-e3/s540x810/5ab3f4fe7ef719a71cac9d0d62fa447b308d8dbd.png)
2. QTY*33 Segment 1
To determine if we send the 1st QTY*33 segment is by making QTY02 element Mandatory
![](https://64.media.tumblr.com/f7bda08e426b9493217fed0777ce6c31/5310405722a36a8b-a6/s540x810/4bf788a3cc4946b7b6fcbaad0617bb7889d39cdf.png)
3. QTY*33 Segment 2
If we need to send the 2nd QTY*33 segment where the quantity is Zero, we will make QTY02 element Mandatory and apply a formula
The BIG difference here is the quantity element; it is alphanumic
![](https://64.media.tumblr.com/4770724c6dda2862f5d1727211c25870/5310405722a36a8b-df/s540x810/a60e25e580ed97c1bacf9fd4d88febf4deea3cdd.png)
4. Create Formula
The formula (below) will be applied to the 2nd QTY*33 to test against the Current Qty Available field. If the field is 0, then an alphanumeric ZERO (’0′) is passed back to the QTY02 element.
![](https://64.media.tumblr.com/908a7ed651ddc195641fe383498e1541/5310405722a36a8b-7c/s540x810/6070de42561ee49825845d6decc98c118af8ee66.png)
By: Sean Hoppe on