上一篇解释了沃尔沃Volvo与供应商 DELFOR(交货计划)的业务需求和实现场景,本文将从以具体的解决方案来解释EDI 的实现。
采购商接收由沃尔沃Volvo发送给供应商的DELFOR 报文,在沃尔沃Volvo EDI解决方案中提到,接收方向的工作流如下: 下面以自定义XML解决方案为例,演示DELFOR的解析步骤。
报文转换
将从沃尔沃Volvo收到的EDIFACT标准的DELFOR 转换为自定XML,主要分为以下步骤:
EDIFACT标准的DELFOR报文
Delivery schedule – DELFOR
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
UNH+1144295+DELFOR:D:96A:UN:A09040' -Message header BGM+241+201503010118' -241 = Delivery schedule -交货计划编号:201503010118 DTM+137:20150301:102' -137 = Document/message date/time -交货计划日期:20150301 DTM+157:20150301:102' -157 = Validity start date -有效起始日期:20150301 NAD+BY+1003::91' -BY = Buyer assigned by seller -采购方编号:1003 NAD+SE+ABC1D::92' -SE = Seller assigned by buyer -销售方编号:ABC1D UNS+D' -Header/detailed section separation NAD+CN+Consignee code::92++VOLVO CARS' -CN = Consignee assigned by buyer and Name -收货方编号:Consignee code LIN++3+1234567:IN' -3 = Changed. -IN Buyer’s item/article number -采购方物料编号:1234567 PIA+1+P04:DR -1 = Additional identification -DR = Drawing revisionnumber -工程变更图号:P04 LOC+11+VTV' -11 = Place/port of discharge -仓库号:VTV LOC+159+VTV' -159 = Additional internal destination -内部卸货点:VTV DTM+257:20150301:102' -257 = Calculation date -累计截止日期:20150301 DTM+51:20150101:102' -51 = Cumulative quantity start date -累计起始日期:20150101 RFF+ON:123412345445' -ON = Order number -采购订单编号:123412345445 RFF+AIF:201502220119' -AIF = Previous delivery instruction number -上一次交货编号:201502220119 QTY+70:210' -70 = Cumulative quantity received -累计接收数量:210 QTY+12:30' -12 = Despatch quantity -上一次交货数量:30 QTY+48:30' -48 = Received quantity -上一次接收数量:30 RFF+AAK:110197' -AAK = Despatch advice number -发货通知编号:201502220119 DTM+171:20150220:102' -171 = Reference date/time -发货通知日期:20150220 QTY+83:60' -83 = Backorder/ in Transit quantity -欠货数量:60 QTY+113:30' -113 = Quantity to be delivered -需求数量:30 SCC+4' -4 = Planning/forecast 预测 DTM+2:201503060000:203' -2 = Delivery date/time, requested -需求日期:201503060000 QTY+113:30' -113 = Quantity to be delivered SCC+4' -4 = Planning/forecast DTM+2:201503120000:203' -2 = Delivery date/time, requested QTY+113:30' -113 = Quantity to be delivered SCC+4' -4 = Planning/forecast DTM+2:201503150000:203' -2 = Delivery date/time, requested QTY+113:30' -113 = Quantity to be delivered SCC+4' -4 = Planning/forecast DTM+2:201503270000:203' -2 = Delivery date/time, requested --- UNS+S' -Detail/summary section separation UNT+106+1144295' -Message Trailer |
Short term schedule – DELFOR
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
UNH+1144295+DELFOR:D:96A:UN:A09040' -Message header BGM+241+201503010118' -241 = Delivery schedule -交货计划编号:201503010118 DTM+137:20150301:102' -137 = Document/message date/time -交货计划日期:20150301 DTM+157:20150301:102' -157 = Validity start date -有效起始日期:20150301 NAD+BY+1003::91' -BY = Buyer assigned by seller -采购方编号:1003 NAD+SE+ABC1D::92' -SE = Seller assigned by buyer -销售方编号:ABC1D UNS+D' -Header/detailed section separation NAD+CN+Consignee code::92++VOLVO CARS' -CN = Consignee assigned by buyer and Name -收货方编号:Consignee code LIN++3+1234567:IN' -3 = Changed. -IN Buyer’s item/article number -采购方物料编号:1234567 PIA+1+P04:DR -1 = Additional identification -DR = Drawing revisionnumber -工程变更图号:P04 LOC+11+VTV' -11 = Place/port of discharge -仓库号:VTV LOC+159+VTV' -159 = Additional internal destination -内部卸货点:VTV DTM+257:20150301:102' -257 = Calculation date -累计截止日期:20150301 DTM+51:20150101:102' -51 = Cumulative quantity start date -累计起始日期:20150101 RFF+ON:123412345445' -ON = Order number -采购订单编号:123412345445 RFF+AIF:201502220119' -AIF = Previous delivery instruction number -上一次交货编号:201502220119 QTY+70:210' -70 = Cumulative quantity received -累计接收数量:210 QTY+12:30' -12 = Despatch quantity -上一次交货数量:30 QTY+48:30' -48 = Received quantity -上一次接收数量:30 RFF+AAK:110197' -AAK = Despatch advice number -发货通知编号:201502220119 DTM+171:20150220:102' -171 = Reference date/time -发货通知日期:20150220 QTY+83:60' -83 = Backorder/ in Transit quantity -欠货数量:60 QTY+113:30' -113 = Quantity to be delivered -需求数量:30 SCC+4' -4 = Planning/forecast 预测 DTM+2:201503060000:203' -2 = Delivery date/time, requested -需求日期:201503060000 QTY+113:30' -113 = Quantity to be delivered SCC+4' -4 = Planning/forecast DTM+2:201503120000:203' -2 = Delivery date/time, requested QTY+113:30' -113 = Quantity to be delivered SCC+4' -4 = Planning/forecast DTM+2:201503150000:203' -2 = Delivery date/time, requested QTY+113:30' -113 = Quantity to be delivered SCC+4' -4 = Planning/forecast DTM+2:201503270000:203' -2 = Delivery date/time, requested --- UNS+S' -Detail/summary section separation UNT+106+1144295' -Message Trailer |
由DELFOR报文转化得到的EDI系统标准XML 以Delivery Schedule为例:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 |
<Interchange Delimiters=":+.?*';" xmlns="http://www.rssbus.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Meta /> <UNB1 type="Composite"> <UNB1.1>UNOA</UNB1.1> <UNB1.2>1</UNB1.2> </UNB1> <UNB2 type="Composite"> <UNB2.1>094200005560743089</UNB2.1> <UNB2.2>30</UNB2.2> <UNB2.3>BP2TU</UNB2.3> </UNB2> <UNB3 type="Composite"> <UNB3.1>0177X11Y000000</UNB3.1> <UNB3.2>30</UNB3.2> <UNB3.3>NBLQIT</UNB3.3> </UNB3> <UNB4 type="Composite"> <UNB4.1>160404</UNB4.1> <UNB4.2>0620</UNB4.2> </UNB4> <UNB5>4943835</UNB5> </Meta> <TransactionSet> <TX-D96A-DELFOR type="TransactionSet"> <Meta /> <_0062>1144295</_0062> <S009 type="Composite"> <_0065>DELFOR</_0065> <_0052>D</_0052> <_0054>96A</_0054> <_0051>UN</_0051> <_0057>A09040</_0057> </S009> </Meta> <BGM type="Segment"> <C002 type="Composite"> <_1001>241</_1001> </C002> <_1004>201503010118</_1004> </BGM> <DTM type="Segment"> <C507 type="Composite"> <_2005>137</_2005> <_2380>20150301</_2380> <_2379>102</_2379> </C507> </DTM> <DTM type="Segment"> <C507 type="Composite"> <_2005>157</_2005> <_2380>20150301</_2380> <_2379>102</_2379> </C507> </DTM> <NADLoop1 type="Loop"> <NAD type="Segment"> <_3035>BY</_3035> <C082 type="Composite"> <_3039>1003</_3039> <_1131></_1131> <_3055>91</_3055> </C082> </NAD> </NADLoop1> <NADLoop1 type="Loop"> <NAD type="Segment"> <_3035>SE</_3035> <C082 type="Composite"> <_3039>ABC1D</_3039> <_1131></_1131> <_3055>92</_3055> </C082> </NAD> </NADLoop1> <UNS type="Segment"> <_0081>D</_0081> </UNS> <NADLoop2 type="Loop"> <NAD type="Segment"> <_3035>CN</_3035> <C082 type="Composite"> <_3039>Consignee code</_3039> <_1131></_1131> <_3055>92</_3055> </C082> <C058 type="Composite"> </C058> <C080 type="Composite"> <_3036>VOLVO CARS</_3036> </C080> </NAD> <LINLoop1 type="Loop"> <LIN type="Segment"> <_1082/> <_1229>3</_1229> <C212 type="Composite"> <_7140>1234567</_7140> <_7143>IN</_7143> </C212> </LIN> <PIA type="Segment"> <_4347>1</_4347> <C212 type="Composite"> <_7140>P04</_7140> <_7143>DR</_7143> </C212> </PIA> <LOC type="Segment"> <_3227>11</_3227> <C517 type="Composite"> <_3225>VTV</_3225> </C517> </LOC> <LOC type="Segment"> <_3227>159</_3227> <C517 type="Composite"> <_3225>VTV</_3225> </C517> </LOC> <DTM type="Segment"> <C507 type="Composite"> <_2005>257</_2005> <_2380>20150301</_2380> <_2379>102</_2379> </C507> </DTM> <DTM type="Segment"> <C507 type="Composite"> <_2005>51</_2005> <_2380>20150101</_2380> <_2379>102</_2379> </C507> </DTM> <RFFLoop2 type="Loop"> <RFF type="Segment"> <C506 type="Composite"> <_1153>ON</_1153> <_1154>123412345445</_1154> </C506> </RFF> </RFFLoop2> <RFFLoop2 type="Loop"> <RFF type="Segment"> <C506 type="Composite"> <_1153>AIF</_1153> <_1154>201502220119</_1154> </C506> </RFF> </RFFLoop2> <QTYLoop1 type="Loop"> <QTY type="Segment"> <C186 type="Composite"> <_6063>70</_6063> <_6060>210</_6060> </C186> </QTY> </QTYLoop1> <QTYLoop1 type="Loop"> <QTY type="Segment"> <C186 type="Composite"> <_6063>12</_6063> <_6060>30</_6060> </C186> </QTY> </QTYLoop1> <QTYLoop1 type="Loop"> <QTY type="Segment"> <C186 type="Composite"> <_6063>48</_6063> <_6060>30</_6060> </C186> </QTY> <RFFLoop3 type="Loop"> <RFF type="Segment"> <C506 type="Composite"> <_1153>AAK</_1153> <_1154>110197</_1154> </C506> </RFF> <DTM type="Segment"> <C507 type="Composite"> <_2005>171</_2005> <_2380>20150220</_2380> <_2379>102</_2379> </C507> </DTM> </RFFLoop3> </QTYLoop1> <QTYLoop1 type="Loop"> <QTY type="Segment"> <C186 type="Composite"> <_6063>83</_6063> <_6060>60</_6060> </C186> </QTY> </QTYLoop1> <QTYLoop1 type="Loop"> <QTY type="Segment"> <C186 type="Composite"> <_6063>113</_6063> <_6060>30</_6060> </C186> </QTY> <SCC type="Segment"> <_4017>4</_4017> </SCC> <DTM type="Segment"> <C507 type="Composite"> <_2005>2</_2005> <_2380>201503060000</_2380> <_2379>203</_2379> </C507> </DTM> </QTYLoop1> <QTYLoop1 type="Loop"> <QTY type="Segment"> <C186 type="Composite"> <_6063>113</_6063> <_6060>30</_6060> </C186> </QTY> <SCC type="Segment"> <_4017>4</_4017> </SCC> <DTM type="Segment"> <C507 type="Composite"> <_2005>2</_2005> <_2380>201503120000</_2380> <_2379>203</_2379> </C507> </DTM> </QTYLoop1> <QTYLoop1 type="Loop"> <QTY type="Segment"> <C186 type="Composite"> <_6063>113</_6063> <_6060>30</_6060> </C186> </QTY> <SCC type="Segment"> <_4017>4</_4017> </SCC> <DTM type="Segment"> <C507 type="Composite"> <_2005>2</_2005> <_2380>201503150000</_2380> <_2379>203</_2379> </C507> </DTM> </QTYLoop1> <QTYLoop1 type="Loop"> <QTY type="Segment"> <C186 type="Composite"> <_6063>113</_6063> <_6060>30</_6060> </C186> </QTY> <SCC type="Segment"> <_4017>4</_4017> </SCC> <DTM type="Segment"> <C507 type="Composite"> <_2005>2</_2005> <_2380>201503270000</_2380> <_2379>203</_2379> </C507> </DTM> </QTYLoop1> </LINLoop1> </NADLoop2> <UNS type="Segment"> <_0081>S</_0081> </UNS> </TX-D96A-DELFOR> </TransactionSet> </Interchange> |
由标准XML格式转换得到的自定义XML
以Delivery Schedule为例:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
<Items> <PO_HEADER> <BUYER_PARTNER_NUMBER>1003</BUYER_PARTNER_NUMBER> <CREATE_DATETIME>2015-03-01 00:00:00</CREATE_DATETIME> <DELIVERY_DATETIME></DELIVERY_DATETIME> <FLAG>0</FLAG> <FREE_TEXT>DELFOR</FREE_TEXT> <ORDER_NUMBER>201503010118</ORDER_NUMBER> <SHIPTO_PARTNER_NUMBER >Consignee code</SHIPTO_PARTNER_NUMBER> <START_DATETIME>2015-03-01 00:00:00</START_DATETIME> <STATUS>2</STATUS> <SUPPLIER_PARTNER_NUMBER>ABC1D</SUPPLIER_PARTNER_NUMBER> <PO_POSITION > <BUYER_ITEM_NUMBER>1234567</BUYER_ITEM_NUMBER> <CUMULATIVE_END_DATE >2015-03-01 00:00:00</CUMULATIVE_END_DATE> <CUMULATIVE_QTY>210</CUMULATIVE_QTY> <CUMULATIVE_START_DATE>2015-01-01 00:00:00</CUMULATIVE_START_DATE> <ITEM_DESCRIPTION>P04</ITEM_DESCRIPTION> <PLANT>VTV</PLANT> <PO_NUMBER>123412345445</PO_NUMBER> <UNLOADING_POINT>VTV</UNLOADING_POINT> <PO_DISPOSITION> <ID>c8b5d5871cf045119c822750f9ee999d</ID> <DATETIME>2019-12-17 18:29:52</DATETIME> <DELIVERY_DATETIME_TYPE>deliveryNote</DELIVERY_DATETIME_TYPE> <QUANTITY>30</QUANTITY> <QUANTITY_QUALIFIER>despatch</QUANTITY_QUALIFIER> </PO_DISPOSITION> <PO_DISPOSITION> <ID>7a866e82318949b690208fbc897158a1</ID> <DATETIME>2019-12-17 18:29:52</DATETIME> <DELIVERY_DATETIME_TYPE>deliveryNote</DELIVERY_DATETIME_TYPE> <QUANTITY>30</QUANTITY> <QUANTITY_QUALIFIER>despatch</QUANTITY_QUALIFIER> </PO_DISPOSITION> <PO_DISPOSITION> <ID>9c035c0e735e47708fb7bb262962e34a</ID> <DATETIME>2019-12-17 18:29:52</DATETIME> <DELIVERY_DATETIME_TYPE>deliveryNote</DELIVERY_DATETIME_TYPE> <QUANTITY>30</QUANTITY> <QUANTITY_QUALIFIER>despatch</QUANTITY_QUALIFIER> </PO_DISPOSITION> <PO_DISPOSITION> <ID>15e487999b4f4b3ebde64b9133f31ba7</ID> <DATETIME>2015-02-20 00:00:00</DATETIME> <DELIVERY_DATETIME_TYPE>deliveryNote</DELIVERY_DATETIME_TYPE> <QUANTITY>30</QUANTITY> <QUANTITY_QUALIFIER>received</QUANTITY_QUALIFIER> <RFF_1>110197</RFF_1> </PO_DISPOSITION> <PO_DISPOSITION> <ID>d8c4786c0c084a428f372eea37787d8b</ID> <DATETIME>2015-02-13 00:00:00</DATETIME> <DELIVERY_DATETIME_TYPE>deliveryNote</DELIVERY_DATETIME_TYPE> <QUANTITY>30</QUANTITY> <QUANTITY_QUALIFIER>received</QUANTITY_QUALIFIER> <RFF_1>108375</RFF_1> </PO_DISPOSITION> <PO_DISPOSITION> <ID>f665d129eb654c9db6319d5328e4f4a9</ID> <DATETIME>2015-02-12 00:00:00</DATETIME> <DELIVERY_DATETIME_TYPE>deliveryNote</DELIVERY_DATETIME_TYPE> <QUANTITY>30</QUANTITY> <QUANTITY_QUALIFIER>received</QUANTITY_QUALIFIER> <RFF_1>108089</RFF_1> </PO_DISPOSITION> <PO_DISPOSITION> <ID>885be2f226894df39f2f5f4ec71dc4ca</ID> <DATETIME>2015-03-06 00:00:00</DATETIME> <DELIVERY_DATETIME_TYPE>delivery</DELIVERY_DATETIME_TYPE> <PLAN_STATUS>4</PLAN_STATUS> <QUANTITY>30</QUANTITY> <QUANTITY_QUALIFIER>delivery</QUANTITY_QUALIFIER> </PO_DISPOSITION> <PO_DISPOSITION> <ID>0099dab8d66843deb93cecfa846dc0e9</ID> <DATETIME>2015-03-12 00:00:00</DATETIME> <DELIVERY_DATETIME_TYPE>delivery</DELIVERY_DATETIME_TYPE> <PLAN_STATUS>4</PLAN_STATUS> <QUANTITY>30</QUANTITY> <QUANTITY_QUALIFIER>delivery</QUANTITY_QUALIFIER> </PO_DISPOSITION> <PO_DISPOSITION> <ID>60c7eb35f529432b956c67cf8611c449</ID> <DATETIME>2015-03-15 00:00:00</DATETIME> <DELIVERY_DATETIME_TYPE>delivery</DELIVERY_DATETIME_TYPE> <PLAN_STATUS>4</PLAN_STATUS> <QUANTITY>30</QUANTITY> <QUANTITY_QUALIFIER>delivery</QUANTITY_QUALIFIER> <STATUS>0</STATUS> </PO_DISPOSITION> <PO_DISPOSITION> <ID>0a2d252112814a61993ccaf34d11fa1d</ID> <DATETIME>2015-03-27 00:00:00</DATETIME> <DELIVERY_DATETIME_TYPE>delivery</DELIVERY_DATETIME_TYPE> <PLAN_STATUS>4</PLAN_STATUS> <QUANTITY>30</QUANTITY> <QUANTITY_QUALIFIER>delivery</QUANTITY_QUALIFIER> </PO_DISPOSITION> </PO_POSITION> </PO_HEADER> </Items> |
更多EDI系统标准XML 到客户自定义XML 的转换步骤,可查看EDI & XML 格式转换。
视频演示
更多沃尔沃Volvo文章
- 总览: [案例]沃尔沃Volvo EDI解决方案
- DELFOR:[案例]沃尔沃Volvo EDI – DELFOR 分析
- DESADV:[案例]沃尔沃Volvo EDI – DESADV
- DESADV:[案例]沃尔沃Volvo EDI – DESADV自定义XML方案
注:文案部分图片及内容来源于网络,版权归原创作者所有,如有侵犯到您的权益,请您联系我们进行删除,给您带来困扰,我们深感抱歉。