Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Many to One Mapping
- This topic has 5 replies, 1 voice, and was last updated 9 years, 3 months ago by
community-content.
-
AuthorPosts
-
-
August 12, 2009 at 8:35 AM #23019
Hi,
I have a Scenario where I have a repeating segment E1EDS01 at the source side……
<E2EDS01GRP><E1EDS01><DATAHEADERREC><SEGNAM>E2EDS01</SEGNAM><MANDT>333</MANDT><DOCNUM>1234567</DOCNUM><SEGNUM>0000599</SEGNUM><PSGNUM>000000</PSGNUM><HLEVEL>02</HLEVEL></DATAHEADERREC><SUMID>001</SUMID><SUMME>9</SUMME><SUNIT /><WAERQ /><SEGMENTPAD /></E1EDS01></E2EDS01GRP><E2EDS01GRP xmlns=”“><E1EDS01><DATAHEADERREC><SEGNAM>E2EDS01</SEGNAM><MANDT>333</MANDT><DOCNUM>33333</DOCNUM><SEGNUM>000052</SEGNUM><PSGNUM>000000</PSGNUM><HLEVEL>02</HLEVEL></DATAHEADERREC><SUMID>002</SUMID><SUMME>92342.25</SUMME><SUNIT>USD</SUNIT><WAERQ /><SEGMENTPAD /></E1EDS01></E2EDS01GRP></ZORDERS05>The Target Schema is the EDI 855 CTT Segment Which I need only one Segment.CTTLoop1CTTCTT01CTT02|‘‘CTT07My condition is If E1EDS01-> SUMID = 001 THEN CTT01 = SUMMEIf E1EDS01-> SUMID = 002 THEN CTT02 = SUMMEBut When I am Simply mapping using equal and Value mapping functoid 2 CTT Segments are generating….But I need to restricy it to one Segment with both of thye above rules for CTT01 aND CTT02. -
August 13, 2009 at 8:03 AM #23031
Any pointers?
-
August 14, 2009 at 6:09 AM #23038
if i understand things correctly, then you should be able to solve it by using Value mapping (flattening) functiod instead of the value mapping one
-
August 14, 2009 at 8:52 AM #23041
I’m doing that…But the target element CTT is a repeated segment…so its generating two records of CTT Like…
<CTTLoop1>
<CTT>
<CTT01>9</CTT01>
</CTT>
</CTTLoop1>
<CTTLoop1>
<CTT>
<CTT02>92342.25</CTT02>
</CTT>
</CTTLoop1>
I Need it Like
<CTTLoop1>
<CTT>
<CTT01>9</CTT01>
<CTT02>92342.25</CTT02>
</CTT>
</CTTLoop1>
So I have to restrict CTTLoop1 to Only one Segment. Anyway Thanks for your reply…
-
August 14, 2009 at 2:43 PM #23043
You need to implement explicit looping. Link something that only occurs once (preferably a parent to the E2EDS01GRP) into a looping functoid, then link that to the CTT node. This will limit it to one occurrence of the CTT. It may be able to see the different SUMIDs if you are sourcing the loop iteration from a parent.
If it can’t see both of the source nodes you need at run time, there are two methods to get the values:
1. One is to value map into a cumulative concatenate (this forces the if test across all occurrences in the document).
2. The other is to cache the values to global variables in a scriptoid, and then extract the values from globals in two other scriptoids.
-
August 17, 2009 at 10:09 AM #23047
I tried with E2EDSP1GRP but its an Loopiing segment…so not working….I could not understand point 2 and 3 …can u explain a bit…?
-
-
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.