none
"39: Data element too long" RRS feed

  • Question

  • Hi everyone

    I'm having some issues with my EDI-mapping.
    I've mapped a D93A_Invoic to a D96A_Invoic schema and everything works fine until it's converting to EDI inside BizTalk 2006 R2 when i get a "Data element too long" in the NADloop1 in the element C08201.
    The problem is that the string that is mapped is 18 digits long and Max Length is 35 in this element. When i remove just one digit it suddenly works again, my conclusion to this is that everything below 18 digits works, even though the Max Length is 35. I need this element to be intact..

    Is there a solution to this problem of mine, or any suggestions on how I can solve it?

    With best regards
    Marcus Hansson
    Friday, January 9, 2009 7:43 AM

Answers

  • Can you check the encoding type of the string. To me it appears that the string is of type "UTF8" which is of variable length. Max lenght of 18 may be represented in 36 bytes if each of the chars are of two byte each an thus violate the max length rule.
    MSFT
    • Marked as answer by Marcus Hansson Tuesday, January 13, 2009 11:34 AM
    Friday, January 9, 2009 4:34 PM
  • Make sure that the schema/project/assembly is build and deployed correctly AND IS UPDATED IN THE GLOBAL ASSEMBLY CACHE (GAC).
    If the new assembly isn't written to the GAC, BizTalk will continue to use the old version of the assembly/schema.

    If, like you mentioned, changing the length to 100 doesn't change the behavior then this might be the problem.

    Hope this helps,
    Gerard
    • Marked as answer by Marcus Hansson Tuesday, January 13, 2009 11:34 AM
    Monday, January 12, 2009 8:09 PM

All replies

  • Did you look at the maximum length annotation in the schema for C08201? I don't have the standard to compare the schema against, but in my copy of the schema the maximum length=17. I expect you could just increase this to 35 and re-deploy the schema.
    Friday, January 9, 2009 4:14 PM
  • Can you check the encoding type of the string. To me it appears that the string is of type "UTF8" which is of variable length. Max lenght of 18 may be represented in 36 bytes if each of the chars are of two byte each an thus violate the max length rule.
    MSFT
    • Marked as answer by Marcus Hansson Tuesday, January 13, 2009 11:34 AM
    Friday, January 9, 2009 4:34 PM
  • Hi,
         Can you check what type of character you are using in your string. your characters may be 2 or 3 bytes long. Then your string length will be  18*2 more than 35 . can you check using single byte characters?



    Thanks
    Gyan
    Friday, January 9, 2009 4:34 PM
  •  Thanks for all these suggestions, I will need to check them later since I'm currently not at work.
    I did try to change the Max Length to 100 letters for testing purpose, and yet with the same result. I will try to check the encoding though, but is it encoded with UTF8.
    It is interesting though that your, ChrisMillerCCI, schema has the default of 17 since that is the limit that mine accepts though it's set to 35 as default. I could not find any property where it says 17 though, but I will check this later.

    With best regards
    Marcus Hansson
    Friday, January 9, 2009 4:46 PM
  • Make sure that the schema/project/assembly is build and deployed correctly AND IS UPDATED IN THE GLOBAL ASSEMBLY CACHE (GAC).
    If the new assembly isn't written to the GAC, BizTalk will continue to use the old version of the assembly/schema.

    If, like you mentioned, changing the length to 100 doesn't change the behavior then this might be the problem.

    Hope this helps,
    Gerard
    • Marked as answer by Marcus Hansson Tuesday, January 13, 2009 11:34 AM
    Monday, January 12, 2009 8:09 PM
  • Thanks everyone, I do think i managed to get this to work.

    I think the solution was a combination of the string being in UTF8 format, therefore needs more than 35 length, and that the Global Assembly Cache wasnt updated. Anyhow, it seems to work now.

    Thanks again!
    Tuesday, January 13, 2009 11:33 AM