EDIFACT file with comma as decimal point is not disassembled "correctly"

Hi

I have a problem when receiving an EDIFACT REMADV file using comma as the decimal point

The scenario:

- I receive an EDIFACT file using the standard EDIFACT-pipeline
- The EDIFACT file has an UNA segment, specifying that this file uses "," (comma) as decimal separator
- The EDIFACT pipeline disassembles the EDIFACT file and produces an XML version

My problem is that in the disassembled XML version of the file, all amounts are still containing a comma in the amount. When I use the XML in a mapping, functoids such as "Cumulative Sum" does not work correctly on these amounts. (the comma is simply ignored). I expect this is because a valid amount in a XML-file should always use a period as a decimal separator.

I can of course correct the amount in the Mapping by using a scripting functoid to change the comma to a period but I do not understand why this should be necessary.

Shouldn't the standard EDIFACT pipeline create amounts with "valid" decimal points in the disassembled xml-out of the pipeline?

[1069 byte] By [hlarsen] at [2008-2-20]
# 1
Yeap,
I've hit the same issue.
I also have to use preprocessor for all those "bad" symbols (there is a topic about this), segments separators.
For issue with decimal separator I use script functoid (calling .NET method).
In my case partners can use '.' or ',' as a decimal separator. Moreover they can use/dont the thausand separators.
I use this method whenever I map value to the "money"/"real" value.
Not sure the EDI system has to work with this problem.
Regards,
Leonid Ganeline
http://geekswithblogs.net/leonidganeline/
LeonidGaneline at 2007-10-3 > top of Msdn Tech,BizTalk Server,BizTalk EDI and AS2...
# 2

This is by design. The cumulative sum functoid expects whole numbers, integers and fractions with decimal represented as a dot. The way to represent a decimal in EDI is via both comma or dot. This causes compatibility issues. As Leonid suggested, whenever you have a comma used as decimal separator, you can use some custom preprocessing to convert that to a dot and then use the sum functoid.

Thanks

Mohsin

MohsinKalam–MSFT at 2007-10-3 > top of Msdn Tech,BizTalk Server,BizTalk EDI and AS2...
# 3
Moshin,
Thanks for answer.
The chain question Smile If this is by design, why in the sender part there has an option with choosing comma/dot for decimal separator? Kinda asymmetrical design.
LeonidGaneline at 2007-10-3 > top of Msdn Tech,BizTalk Server,BizTalk EDI and AS2...