# EDI creation problem  convertToString

**URL:** <https://techcommunity.softwareag.com/t/edi-creation-problem-converttostring/107521>\
**Category:** Forum\
**Tags:** EDI\
**Created:** [July 24, 2004, 3:17am UTC](https://techcommunity.softwareag.com/t/edi-creation-problem-converttostring/107521 "2004-07-24T03:17:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guest](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guest/32/75_2.png) [@Guest](https://techcommunity.softwareag.com/u/Guest)\
**Post date:** [July 24, 2004, 3:17am UTC](https://techcommunity.softwareag.com/t/edi-creation-problem-converttostring/107521/1 "2004-07-24T03:17:49Z")

</div>

I am trying to use convertToString to create an EDI file. The service takes a document T810DT, which is created from EDIFFSchema T810. In the schema, some fields have length constraints. So if I have some bad data in the input T810DT, it won’t create an EDI string. I have two questions:

1. Can we generate an XML schema out of the flat file schema so that the length constraits will be usable? ( then I could convert the T810DT to an XML node and then validate it against the xml schema to catch the bad data)

2. Why is the errorArray always null even something wrong really happens in convertToString?

Thanks!

---

<div class="post-metadata">

**Author:** ![gupta\_r.17495](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@gupta\_r.17495](https://techcommunity.softwareag.com/u/gupta_r.17495)\
**Post date:** [July 24, 2004, 6:05am UTC](https://techcommunity.softwareag.com/t/edi-creation-problem-converttostring/107521/2 "2004-07-24T06:05:33Z")

</div>

Hi,

Please take some time and register your self.

Regarding EDI validation procedure,check this thread link.,  
[url=“[wmusers.com](http://www.wmusers.com/wmusers/messages/117/36465.shtml)”][wmusers.com](http://www.wmusers.com/wmusers/messages/117/36465.shtml%5B/url%5D)

you have to pass the valid EDI 810 segment structure,field data then only convertToString (based on the ffschema) it will internally validate and creates the EDI String.

So make sure in the edi mapping is done correctly,based on the EDI messageguidlines (specification),or use any Specbuilder tool to know about on the EDI Segments/Field length constraints.

HTH,

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 3:04pm UTC](https://techcommunity.softwareag.com/t/edi-creation-problem-converttostring/107521/3 "2021-04-02T15:04:50Z")

</div>


