flatfile Schema creation from the IDOC structure provided(in doc)

Hi all,

I am working on creating a ffShema from the IDOC structure provided to me. Here in this case, When we receive the IDOC we are mapping it to the Canonical and then we are converting it to a flatfile after some transformations.

My questions are,

  1. When you first map the IDOC to IDOC Doc type(which we will create from the dtd provided) and when mapping it to the canonical. There are only few fields which have the data. Is it mandatory to create a canonical with all fields…or is our choice. Just to mention only those fields which have data.?

  2. I have given the IDOC structure which has Header, Detail, Trailer. In Header there are like 10 segments, Detail has some 10 segments(again they have sub segments) and trailer has 10 segments. But only few segments have the values. I know the flatfile fields and their lengths. And also Header,Detail,Trailer will be three record definitions on the same level? and the subfields will be field definitions? I am assuming that I need to create a ffschema where only the fields which have the values are mentioned.

  3. I have found that ‘wm.b2b.edi:createIDOCtemplate’ can create a ffschema provided the IDOC name etc.? My Question is will this create for any kind of IDOC and also if it creates the ffschema. Can I change the schema so that I minimize the number of fields…so that I can map my canonical to the document type generated.?

Kindly assist. This is very important. Your suggestions and thoughts are well appreciated.

Thanks all and Thanks in advance.

Hello David,
Create the schema with all the fields that exists in IDOC, and your IS Canonical document should replicate the same. It is not advisable to remove the fields from Canonical document.

Canonical means, it maintains Industry standard format.

You wont have any problem by other fields which is of no interest for you.

Thanks
Senthil

Hi Senthil,

I understand what you’re trying to say. In my scenario, we are publishing the same IDOC document type on to broker( This IDOC Doc Type is our canonical).

I mean to say… After creating the IDOC doctype in webMethods…we are making it publishable(which makes itself as canonical). So, there are so many segments inside the IDOC doctype structure.

And my flatfile is a simple flatfile of fixed length. So, I created a schema where below the header(repeata unlimited) i have created the fields. From that i created the document type and to that i mapped the IDOC doctype canonical fields.

is this the right approch?

Yes. Right.

Receive and publish IDoc canonical to broker, subscribe it, map it to target structure which is the flatfile structure, validate flatfile as per schema, convert it to a string, send it to target.

Hi Senthil,

I did the same thing what you said. But the problem is that…if IDOC is not sending anything…converttoString is parsing that value. I mean…In FFSchema if a field is mandatory…but IDOC doesn’t send it…even then Flatfile is getting generated with that field missing…

How do i validate this? I am validating with the ffschema at the time of convert to string.

Do I need to validate IDOC after receiving it…if yes, what are the steps.

please help…Its very urgent.