IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

webMethods converting 20 to 2E1 (scientific notation?) in 850

webMethods Community Member

webMethods Community MemberThu September 05, 2013 12:40 PM

  • 1.  webMethods converting 20 to 2E1 (scientific notation?) in 850

    Posted Thu September 05, 2013 11:15 AM

    We are currently using webMethods 6.5. Until now we have only been on the receiving end of 850 documents. We are now trying to send 850s. When I test the mapping of a document, the PO102 segment (X12 4010 850) is converted from 20 to 2E1 (and 2 becomes 2E0, etc.).

    In developer I took a look at WmEDIforTN:EDIFF:X12:V4010:T850 and noticed that the built-in flow service formatDecimal is being used (I assume this is AFTER my mapping, because when i trace it, it is not 2E1, but in TN Console it is).

    1. Is there something I am doing wrong that is causing it to convert to scientific notation (I have trimmed the field before mapping it…I can’t think of anything else)

    2. I tested the formatDecimal myself in a test flow service and it did NOT do this…Can I somehow change the parameters for this particular mapping I’m working on?

    3. If I go to the Dictionary under WmEDIforTN:EDIFF:X12:V4010 (field definition 330) I can remove the formatDecimal. Will this affect any incoming 850 documents? Or is this only for outgoing documents?

    TIA,
    I. Jamal


    #Integration-Server-and-ESB
    #webMethods
    #edi


  • 2.  RE: webMethods converting 20 to 2E1 (scientific notation?) in 850

    Posted Thu September 05, 2013 11:26 AM

    Work arround for this issue is appened the value in EDI Data seperately after convertToString is done


    #webMethods
    #edi
    #Integration-Server-and-ESB


  • 3.  RE: webMethods converting 20 to 2E1 (scientific notation?) in 850

    Posted Thu September 05, 2013 11:30 AM

    How would I do that? and where did convertToString come in? I only mentioned formatDecimal…


    #webMethods
    #Integration-Server-and-ESB
    #edi


  • 4.  RE: webMethods converting 20 to 2E1 (scientific notation?) in 850

    Posted Thu September 05, 2013 11:32 AM

    Look into option “Formatvalue” in convertTostring and add string “Decimal” to Formatvalue Document, Hard code value “Decimal” to the String

    Note: Make sure your other EDI data not got affected


    #Integration-Server-and-ESB
    #edi
    #webMethods


  • 5.  RE: webMethods converting 20 to 2E1 (scientific notation?) in 850

    Posted Thu September 05, 2013 11:42 AM

    Or else you can try this

    My webMethods, go to Administration >
    Integration > B2B Settings > Configure Properties

    And change EDI Module Format Settings–>FormatService–>formatDecimal as required.


    #Integration-Server-and-ESB
    #webMethods
    #edi


  • 6.  RE: webMethods converting 20 to 2E1 (scientific notation?) in 850

    Posted Thu September 05, 2013 11:43 AM

    Sorry ignore my last message, it not working

    Issue happens at ConvertToString that data is formated according to Schema

    All you need to do keep the PO102 value that need to mapped till convertToValues step later Append this in EDI(it’s little tricky you have use lot of string function and it may give wrong results some time)

    or Use FormatInfo Option to stop formatting services, I am not sure what is exact value that need to used, try to check in that way


    #edi
    #Integration-Server-and-ESB
    #webMethods


  • 7.  RE: webMethods converting 20 to 2E1 (scientific notation?) in 850

    Posted Thu September 05, 2013 11:51 AM

    I agree with sreenivas suggestion, it good one to solve this issue


    #edi
    #webMethods
    #Integration-Server-and-ESB


  • 8.  RE: webMethods converting 20 to 2E1 (scientific notation?) in 850

    Posted Thu September 05, 2013 12:03 PM

    We are using 6.5, so I found it under Integration Server>Solutions>EDI…>Configure Field Formats

    I see XML that defines it as:

    <FormatService
    name=“formatDecimal”
    isEnabled=“true”
    internalFormatString=“#.##########”
    externalFormatString=“#.#####E0
    applyFormat=“true”/>

    I have a couple questions:

    1. If i change this externalFormatString will it affect any INCOMING 850 documents? (or does it, as I hope, only affect outgoing documents?).
    2. Can I change it to NOT EDITABLE as in the formatImpliedDecimal so that it does not change it in any way?

    Regards,

    I. Jamal


    #edi
    #Integration-Server-and-ESB
    #webMethods


  • 9.  RE: webMethods converting 20 to 2E1 (scientific notation?) in 850

    Posted Thu September 05, 2013 12:10 PM

    OK…“NOT EDITABLE” didn’t seem to work :P…it just added the text “NOT EDITABLE” in front of the number in the PO102 segment…so I changed it to match the internalFormatString

    Anyone have info on how this “internal”/“external” is handled (and whether my changes will affect incoming documents at all)?

    Regards,

    I. Jamal


    #edi
    #webMethods
    #Integration-Server-and-ESB


  • 10.  RE: webMethods converting 20 to 2E1 (scientific notation?) in 850

    Posted Thu September 05, 2013 12:21 PM

    You will see a line like this below


    <FormatService

    Chnage it to

    <FormatService
    name=“formatDecimal”
    isEnabled=“true”
    internalFormatString=“#.##########”
    externalFormatString=“#.##########”
    applyFormat=“true”/>
    <FormatService

    Let me know it worked or not


    #Integration-Server-and-ESB
    #webMethods
    #edi


  • 11.  RE: webMethods converting 20 to 2E1 (scientific notation?) in 850

    Posted Thu September 05, 2013 12:32 PM

    Yes…I’ve done that…and it worked…my only concern is whether it will affect incoming documents as well

    Regards,

    I. Jamal


    #webMethods
    #Integration-Server-and-ESB
    #edi


  • 12.  RE: webMethods converting 20 to 2E1 (scientific notation?) in 850

    Posted Thu September 05, 2013 12:35 PM

    I just tested formatDecimals service and it’s not effecting convertToDocument.

    To make sure test Inbound transaction again


    #edi
    #Integration-Server-and-ESB
    #webMethods


  • 13.  RE: webMethods converting 20 to 2E1 (scientific notation?) in 850

    Posted Thu September 05, 2013 12:37 PM

    I’ve tested a couple incoming documents…it SEEMS to work (it’s not affecting inbound documents, and outbound documents are left unmodified with the CORRECT PO102 value).

    I’ll keep you posted if anything is wrong.

    Thanks for your help guys,

    I. Jamal


    #Integration-Server-and-ESB
    #edi
    #webMethods


  • 14.  RE: webMethods converting 20 to 2E1 (scientific notation?) in 850

    Posted Thu September 05, 2013 12:40 PM

    Good to hear that issue got fixed


    #edi
    #webMethods
    #Integration-Server-and-ESB


  • 15.  RE: webMethods converting 20 to 2E1 (scientific notation?) in 850

    Posted Thu September 05, 2013 02:39 PM

    You can just set to false instead…I don’t think it impact any thing and resolves outbound exponential issues.

    formatDecimal
    applyFormat="false"/>


    #edi
    #Integration-Server-and-ESB
    #webMethods