<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Integration Advisor: Lookup Value from Another Node Based on Current Source Node Value in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/integration-advisor-lookup-value-from-another-node-based-on-current-source/qaa-p/13763452#M4837290</link>
    <description>The only way I have been able to manage this type of thing in IA is to generate a variable sequence and process the entries in a for-each loop. My scenario is index based so it's one less step than matching by key, but with sequences as inputs it can be tricky for something like this.</description>
    <pubDate>Wed, 17 Jul 2024 12:56:38 GMT</pubDate>
    <dc:creator>Ryan-Crosby</dc:creator>
    <dc:date>2024-07-17T12:56:38Z</dc:date>
    <item>
      <title>Integration Advisor: Lookup Value from Another Node Based on Current Source Node Value</title>
      <link>https://community.sap.com/t5/technology-q-a/integration-advisor-lookup-value-from-another-node-based-on-current-source/qaq-p/13763346</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;Hi All,&lt;BR /&gt;&lt;BR /&gt;Hope someone has encountered this before in MAG as it seems Integration Advisor is not as straightforward as using generic XSLT or XPATH.&lt;BR /&gt;&lt;BR /&gt;Sample Input:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;lt;DELVRY07&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;lt;E1EDL20&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;lt;E1EDL24&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;lt;E1EDL24&amp;gt;&lt;/SPAN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gt;&amp;lt;/E1EDL44&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;lt;/E1EDL44&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;lt;/E1EDL37&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;lt;/E1EDL20&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;lt;/DELVRY07&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;I am trying to figure out an XSLT function to get value of E1EDL24/EAN11 if E1EDL24/POSNR = E1EDL44/POSNR. I've tried the following ways below already but nothing works:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;a. &amp;lt;xsl:value-of select="$nodes_in/E1EDL24[POSNR = $nodes_in/POSNR]/EAN11"/&amp;gt;&amp;nbsp;&lt;BR /&gt;&lt;STRONG&gt;--No error but just blank.&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;b. &amp;lt;xsl:value-of select="/DELVRY07/E1EDL20/E1EDL24/E1EDL24[POSNR='$nodes_in/POSNR']/EAN11"/&amp;gt;&amp;nbsp;&lt;BR /&gt;&lt;STRONG&gt;--ERROR: &lt;/STRONG&gt;Failed to simulate MAG: Leading '/' selects nothing: the context item is absent&lt;BR /&gt;&lt;BR /&gt;c. &amp;lt;xsl:key name="eanbyposnr" match="$nodes_in/E1EDL24" use="POSNR"/&amp;gt;&lt;BR /&gt;&amp;lt;xsl:value-of select="key('eanbyposnr', $nodes_in/POSNR)/EAN11"/&amp;gt;&lt;BR /&gt;&lt;STRONG&gt;--ERROR: &lt;/STRONG&gt;Failed to simulate MAG: An xsl:function element must not contain an xsl:key element, Element xsl:key must be top-level (a child of xsl:stylesheet, xsl:transform, or xsl:package)&lt;BR /&gt;&lt;BR /&gt;d. Using template, but it's &lt;I&gt;&lt;STRONG&gt;not allowed&lt;/STRONG&gt;&lt;/I&gt; at xslt function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2024 11:51:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/integration-advisor-lookup-value-from-another-node-based-on-current-source/qaq-p/13763346</guid>
      <dc:creator>Jovee</dc:creator>
      <dc:date>2024-07-17T11:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: Integration Advisor: Lookup Value from Another Node Based on Current Source Node Value</title>
      <link>https://community.sap.com/t5/technology-q-a/integration-advisor-lookup-value-from-another-node-based-on-current-source/qaa-p/13763452#M4837290</link>
      <description>The only way I have been able to manage this type of thing in IA is to generate a variable sequence and process the entries in a for-each loop. My scenario is index based so it's one less step than matching by key, but with sequences as inputs it can be tricky for something like this.</description>
      <pubDate>Wed, 17 Jul 2024 12:56:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/integration-advisor-lookup-value-from-another-node-based-on-current-source/qaa-p/13763452#M4837290</guid>
      <dc:creator>Ryan-Crosby</dc:creator>
      <dc:date>2024-07-17T12:56:38Z</dc:date>
    </item>
    <item>
      <title>Re: Integration Advisor: Lookup Value from Another Node B...</title>
      <link>https://community.sap.com/t5/technology-q-a/integration-advisor-lookup-value-from-another-node-based-on-current-source/qaa-p/13763505#M4837299</link>
      <description>&lt;P&gt;&lt;FONT size="2"&gt;I got it worked already referencing @&lt;A class="" href="https://community.sap.com/t5/user/viewprofilepage/user-id/748634" target="_self"&gt;&lt;SPAN class=""&gt;dharamverma&lt;/SPAN&gt;&lt;/A&gt;'s &lt;A href="https://community.sap.com/t5/technology-blogs-by-members/integration-advisor-conditional-mapping-in-mag-to-pass-one-value-from-the/ba-p/13574923" target="_self"&gt;post&lt;/A&gt;&amp;nbsp;in using the node position. Thanks.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;xsl:variable name="vPOSNR" select="$nodes_in/POSNR24"/&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;xsl:variable name="vEAN11" select="$nodes_in/EAN11"/&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;xsl:for-each select="$nodes_in/POSNR24"&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;xsl:variable name="vPOS" select="position()" /&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;xsl:if test="$vPOSNR[$vPOS] = $nodes_in/POSNR44"&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;xsl:value-of select="$vEAN11[$vPOS]"/&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;/xsl:if&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;/xsl:for-each&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jovee_0-1721219502073.png"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/137730iE97D2F78D17E840F/image-size/medium?v=v2&amp;amp;px=400" alt="Jovee_0-1721219502073.png" title="Jovee_0-1721219502073.png" /&gt;&lt;/span&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2024 13:34:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/integration-advisor-lookup-value-from-another-node-based-on-current-source/qaa-p/13763505#M4837299</guid>
      <dc:creator>Jovee</dc:creator>
      <dc:date>2024-07-17T13:34:17Z</dc:date>
    </item>
  </channel>
</rss>

