public void extractShipFromN4(Loop inLoop) throws OBOEException { Segment segment = null; // valid = true; try { segment = inLoop.getSegment("N4"); } catch (Exception exc) { } if (segment == null) { // The N4 ship from is optional. return; } String cityName = getField(segment, 1, false, null); ediInp856Vw.setShipFromCity(cityName); String stateProvinceCode = getField(segment, 2, false, null); ediInp856Vw.setShipFromState(stateProvinceCode); String postalCode = getField(segment, 3, false, null); ediInp856Vw.setShipFromPostalCode(postalCode); return; }