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,
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.?
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.
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.
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.
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.
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.
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.