on 09-11-2011 7:36 PM
I have a query regarding XSLT mapping
I have two E1EDK03 segments for the same qualifier. But I want the values based on posiotion
Example:
<E1EDK03 SEGMENT="1">
<IDDAT>012</IDDAT>
<DATUM>20110720</DATUM>
</E1EDK03>
<E1EDK03 SEGMENT="1">
<IDDAT>012</IDDAT>
<DATUM>20110905</DATUM>
</E1EDK03>
If position = 1, I need the 1st set of E1EDK03
<E1EDK03 SEGMENT="1">
<IDDAT>012</IDDAT>
<DATUM>20110720</DATUM>
</E1EDK03>
If position = 2, I need the 2nd set of E1EDK03
<E1EDK03 SEGMENT="1">
<IDDAT>012</IDDAT>
<DATUM>20110905</DATUM>
</E1EDK03>
How to achieve that using XSLT
Thanks
Hi Ramesh,
Source is the Orders Idoc and Target structure is also Idoc structure with a different structure required by third party as below
E1EDK01 (Header) Original
E1EDP01 (Item1)
E1EDS01 (Trailer)
E1EDK01 (Header) respective Correction
E1EDP01 (Item2)
E1EDS01 (Trailer)
E1EDK01 (Header) Original
E1EDP01 (Item3)
E1EDS01 (Trailer)....
Thanks,
Varun
Edited by: Varun Reddy on Sep 12, 2011 6:25 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Since we have E1EDK03 with same qualifier 012, I don't have any other identifier to distinguish them, because at one instance I need 1st occurrence of E1EKD03 structure and another instance I need the 2nd occurrence of E1EDK03.
If you observe, only DATUM will have different values. I was trying to do that using position function
I have defined a variable to copy the segments and later trying to get the each segment based on position
<!--copying all the E1EDK03 qualifier 012 segments -->
<xsl:variable name="e1edk03_qual_012">
<xsl:for-each select="//IDOC/*">
<xsl:if test="starts-with(name(), 'E1EDK03') and IDDAT = '012'">
<xsl:copy-of select="."></xsl:copy-of>
</xsl:if>
</xsl:for-each>
</xsl:variable>
Now the above code has
<E1EDK03 SEGMENT="1">
<IDDAT>012</IDDAT>
<DATUM>20110720</DATUM>
</E1EDK03>
<E1EDK03 SEGMENT="1">
<IDDAT>012</IDDAT>
<DATUM>20110905</DATUM>
</E1EDK03>
I want to split these into two E1EDK03 segments and use further in the XSLT mapping and populate in the target
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
What do you mean by Position=1, are you passing value as 1,2... or do you need separate segments?
regards
Ramesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.