Mapping EdiFact,映射Copaym-Coplat消息

Mapping EdiFact,映射Copaym-Coplat消息,mapping,standards,edifact,Mapping,Standards,Edifact,我有以下格式的Coplat消息 DEB1234567890 5 CODE1 5 2007020610471COPLAT0 (... other data here ....) DEB1234567890 5 CODE2 5 2007020610471COPLAT0 (... other data here ....) FIN00000245 您可以注意到,上面的消息有两个DEB部分 我想创建一个可以映射到该Coplat消息的Copaym

我有以下格式的Coplat消息

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

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

FIN00000245     
您可以注意到,上面的消息有两个DEB部分

我想创建一个可以映射到该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消息,这意味着在翻译时,我必须分别获得两个代码为1和代码为2的DEB部分,我尝试了以下方法:

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+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,代码为1,这是消息:

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'
内部有一个UNB段和两个UNH段。
有谁能帮我制作一个Copaym消息,这样我就可以得到两个DEB段,分别是代码1和代码2?

这是正确的格式,您只需为这两条消息指定不同的交换标识即可