Geeks With Blogs
Pseudo Knowledge Base Useful stuff I've collected... Enjoy.

I recently came across a new mapping problem.  I needed to make sure that the final document only had one address for a paper mill to satisfy the requirement of a standard documentation format (PAPINet).  Usually the product is all made to order but every so often paper may be available from stock that was made in a different mill.  The SAP system providing the information contains information on both mills.  The challenge here was to remove the additional mills and only include the mill data for the first mill.  In this case the mill information is not important as the ID for the paper (TAPI) includes a character that identifies the producing mill.

My first attempt was to limit the number of occurrences of the Mill element.  BizTalk ignored the limit.

Tried to limit the number of occurances using the schema.  Unsuccessful


I then tried to use the 'Data Flattening' functoids with an 'Iteration' functoid.  I set the 'Equal' functoid to receive the value from the 'Iteration' functiod and added a constant value of 1 (BizTalk must use 1 base in it's iterations).  When the 'Iteration' functoid equals 1 it will resolve to true allowing the 'Data Flattening' functoids to only process the first occurrence of the Mill attribute.

Using the iteration functoid to limit the number of occurances


The overall solution is a complex mapping from SAP to PAPINet.  It uses a canonical structure to assist in the transformation.  This problem was greatly simplified by using the canonical to canonical mapping (added to allow some complex calculations to be preformed).

Posted on Wednesday, May 13, 2009 11:04 AM BizTalk , BizTalk_Mapping , Functiods | Back to top


Comments on this post: How to Map the Selection of the First Item in a Collection to the Final Document

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Geordie | Powered by: GeeksWithBlogs.net