public void extractReferenceIdentificationREF(Loop inLoop) throws OBOEException { int qty; try { qty = inLoop.getSegmentCount("REF"); } catch (Exception e) { return; } Segment segment = null; // valid = true; for (int ii = 0; ii < qty; ii++) { try { segment = inLoop.getSegment("REF", ii); } catch (Exception exc) { } if (segment == null) { return; } String identQualifier = getField(segment, 1, false, null); String identification = getField(segment, 2, false, null); if ("1V".equals(identQualifier)) { ediInp856Vw.setPurchOrderNum(identification); } else if ("2I".equals(identQualifier) || "CN".equals(identQualifier)) { ediInp856Vw.setTrackingNum(identification); } else if ("D2".equals(identQualifier)) { ediInp856Vw.setDistOrderNum(identification); } else if ("ZZ".equals(identQualifier)) { ediInp856Vw.setPurchOrderNum(identification); } } return; }
public void extractPurchaseOrderReferencePRF(Loop inLoop) throws OBOEException { Segment segment = null; try { segment = inLoop.getSegment("PRF"); } catch (Exception exc) { } if (segment == null) { return; } String purchaseOrderNumber = getField(segment, 1, false, null); if (Utility.isSet(ediInp856Vw.getDistOrderNum()) && !ediInp856Vw.getDistOrderNum().equals(purchaseOrderNumber)) { ediHandler.appendIntegrationRequest(ediInp856Vw); ediInp856Vw = ediInp856Vw.copy(); ediInp856Vw.setItems(new EdiInp856ItemViewVector()); } ediInp856Vw.setDistOrderNum(purchaseOrderNumber); return; }