Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Mapping Invoice Schema to Product lines Schema
- This topic has 2 replies, 1 voice, and was last updated 9 years, 3 months ago by
community-content.
-
AuthorPosts
-
-
December 5, 2006 at 8:50 PM #16741
Hello,
This is my first attempt at BizTalk. I have an Invoice file that contains data for multiple invoices with the following format:
Header record
Invoice A header record
Product 1 for Invoice A record
Product 2 for Invoice A record
Invoice B header record
Product 1 for Invoice B record
I have created the XML schema for this and it seems to work OK. I would like the output to only contains one type of record. This record contains a combination of data from the invoice header record and the product record.
I created the map using Table Looping and Table Extractor functoid for the Product data and directly mapped the Invoice source fields to the corresponding fields.
I expected 3 output records but unfortunately the 2nd product record for Invoice A is missing. Could anyone advise me on how to map this to achieve the required output or direct me to suitable sample/tutorials please?
Cheers
Stable
-
December 6, 2006 at 3:30 AM #16745
If I understand correctly you are trying to flatten the invoices.
You should be able to connect the product record to the output record using a looping functoid and then just connect the fields from the header and product records to the appropriate fields in the output record.
-
December 6, 2006 at 4:54 PM #16761
Hello,
Thanks Greg, I really appreciate the tip you gave – it worked. I had previously tried using the looping functoid but had also connected the invoice header to it and that output twice the number of output records with incorrect fields.
I had also simplified my input file to get the BizTalk running. It actually looks like this:
Header record
Invoice A header record
Product 1 for Invoice A record
Serial Number record for Product 1
Product 2 for Invoice A record
Invoice B header record
Product 1 for Invoice B record
I.e. Each product record may be followed by a Serial number record. There is also a line item number field on both the Product and Serial Number record to match the two records. All records have a tag identifier.
In the BizTalk map, when I connect the serial# field to the appropriate field in the output record it uses the data from the first Serial number record for all other products in the same invoice. I also tried connecting the Serial Number record to the looping functoid but that produced incorrect result.
How do I show the Product and Serial Number relationship in the mapping?
If the Product quantity is greater than 1 then I would like also like to produce n output records where Product quantity = n (similar to a for each loop). Can this be achieved in BizTalk mapping?
As my questions indicate I’m very new at BizTalk! Are there tutorial/samples available?
Cheers
Stable
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.