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

  • Question

  • 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?
    Friday, June 15, 2007 1:16 PM

Answers

  • 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
     
    Friday, June 15, 2007 6:29 PM
  • 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 

    Monday, June 18, 2007 7:33 PM

All replies

  • 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
     
    Friday, June 15, 2007 6:29 PM
  • 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 

    Monday, June 18, 2007 7:33 PM
  • 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.
    Wednesday, June 20, 2007 6:10 PM