2009-08-10 34 views
0

我有以下列格式EDIFACT,映射Copaym - Coplat消息

DEB1234567890 5 CODE1  5 2007020610471COPLAT0 
(... other data here ....) 

DEB1234567890 5 CODE2  5 2007020610471COPLAT0 
(... other data here ....) 

FIN00000245  

上述消息具有兩個DEB部分,你可以看到一個Coplat消息。

我想創建一個可映射到該Coplat消息的Copaym消息,這是一個帶有一個BGM段的Copaym消息的示例。

UNB+UNOC:2+1234567890:5+CODE1' 
UNH+1000000+COPAYM:0:4.2:RT' 
BGM+903:ZZZ+1000000' 
    (... other data here ....) 
UNT+62:1000000' 
UNZ+2+091000000' 

我要創建兩個消息這樣一個被翻譯成以上Coplat消息,指當翻譯,我必須獲得2個DEB部分與CODE1和CODE2 respectivily,我嘗試這樣做:

UNB+UNOC:2+1234567890:5+CODE1' 
UNH+1000000+COPAYM:0:4.2:RT' 
BGM+903:ZZZ+1000000' 
    (... other data here ....) 
UNT+62:1000000' 
UNZ+2+091000000' 

UNB+UNOC:2+1234567890:5+CODE2' 
UNH+1000000+COPAYM:0:4.2:RT' 
BGM+903:ZZZ+1000000' 
    (... other data here ....) 
UNT+62:1000000' 
UNZ+2+091000000' 

但我得到了語法錯誤,所以我讓所有的數據一個UNB段其中工程裏面,但所產生的Coplat只有一個DEB與CODE1,這就是消息:

UNB+UNOC:2+1234567890:5+CODE1' 
UNH+1000000+COPAYM:0:4.2:RT' 
BGM+903:ZZZ+1000000' 
    (... other data here ....) 
UNT+62:1000000' 

UNH+1000000+COPAYM:0:4.2:RT' 
BGM+903:ZZZ+1000000' 
    (... other data here ....) 
UNT+62:1000000' 
UNZ+2+091000000' 

在e UNB和2個UNH部分。 任何人都可以幫助如何製作Copaym消息,以便使用CODE1和CODE2獲得2個DEB段?

回答

0

這是正確的格式,你剛纔爲兩個消息指定不同的交匯處identifires

UNB+UNOC:2+1234567890:5+CODE1' 
UNH+1000000+COPAYM:0:4.2:RT' 
BGM+903:ZZZ+1000000' 
    (... other data here ....) 
UNT+62:1000000' 
UNZ+2+091000000' 

UNB+UNOC:2+1234567890:5+CODE2' 
UNH+1000000+COPAYM:0:4.2:RT' 
BGM+903:ZZZ+1000000' 
    (... other data here ....) 
UNT+62:1000000' 
UNZ+2+091000000'