<?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: XI Mapping- Filter rows based on source field value in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/xi-mapping-filter-rows-based-on-source-field-value/qaa-p/2390395#M1025341</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vinay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all read the file into XI.&lt;/P&gt;&lt;P&gt;Then you map your condition with createif to the root node of the target ie.,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Condition&lt;DEL&gt;&amp;gt;createif&lt;/DEL&gt;&amp;gt;target root node.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if the condition is true then only your target node will be created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; If this doesnot work due to multiple structures then another option I have is to do multiple mappings. So in the first mapping you send the whole row into XI. Then you parse it up and send the good records to the target. Then you in the second mapping you just map to the target.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;---Satish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Jun 2007 02:38:43 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-05T02:38:43Z</dc:date>
    <item>
      <title>XI Mapping- Filter rows based on source field value</title>
      <link>https://community.sap.com/t5/technology-q-a/xi-mapping-filter-rows-based-on-source-field-value/qaq-p/2390394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I am trying to insert rows into a database. From all the rows in the source structure i will need to pick rows based on a source field, if the source field value matches a certain value 'WA'  then that row needs to be mapped to the access structure of the target.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2007 01:48:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/xi-mapping-filter-rows-based-on-source-field-value/qaq-p/2390394</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-05T01:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: XI Mapping- Filter rows based on source field value</title>
      <link>https://community.sap.com/t5/technology-q-a/xi-mapping-filter-rows-based-on-source-field-value/qaa-p/2390395#M1025341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vinay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all read the file into XI.&lt;/P&gt;&lt;P&gt;Then you map your condition with createif to the root node of the target ie.,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Condition&lt;DEL&gt;&amp;gt;createif&lt;/DEL&gt;&amp;gt;target root node.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if the condition is true then only your target node will be created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; If this doesnot work due to multiple structures then another option I have is to do multiple mappings. So in the first mapping you send the whole row into XI. Then you parse it up and send the good records to the target. Then you in the second mapping you just map to the target.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;---Satish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2007 02:38:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/xi-mapping-filter-rows-based-on-source-field-value/qaa-p/2390395#M1025341</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-05T02:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: XI Mapping- Filter rows based on source field value</title>
      <link>https://community.sap.com/t5/technology-q-a/xi-mapping-filter-rows-based-on-source-field-value/qaa-p/2390396#M1025342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thats a good idea given bby Satish. Also, you might want to create UDF if things really seems to be clumsy in graphical tool (Assumption is you know the basic java for writing the UDF).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2007 02:45:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/xi-mapping-filter-rows-based-on-source-field-value/qaa-p/2390396#M1025342</guid>
      <dc:creator>VijayKonam</dc:creator>
      <dc:date>2007-06-05T02:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: XI Mapping- Filter rows based on source field value</title>
      <link>https://community.sap.com/t5/technology-q-a/xi-mapping-filter-rows-based-on-source-field-value/qaa-p/2390397#M1025343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vinay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you give the sample source payload - structure. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;raj.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2007 02:49:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/xi-mapping-filter-rows-based-on-source-field-value/qaa-p/2390397#M1025343</guid>
      <dc:creator>justin_santhanam</dc:creator>
      <dc:date>2007-06-05T02:49:38Z</dc:date>
    </item>
    <item>
      <title>Re: XI Mapping- Filter rows based on source field value</title>
      <link>https://community.sap.com/t5/technology-q-a/xi-mapping-filter-rows-based-on-source-field-value/qaa-p/2390398#M1025344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Raj&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Attached are the sample payloads i created to simulate my problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Source: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;ns0:test1 xmlns:ns0="urn:cop-city:test"&amp;gt;&lt;/P&gt;&lt;P&gt;   &amp;lt;row&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;parm1&amp;gt;C&amp;lt;/parm1&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;parm2&amp;gt;1&amp;lt;/parm2&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;parm3&amp;gt;10&amp;lt;/parm3&amp;gt;&lt;/P&gt;&lt;P&gt;   &amp;lt;/row&amp;gt;&lt;/P&gt;&lt;P&gt;   &amp;lt;row&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;parm1&amp;gt;A&amp;lt;/parm1&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;parm2&amp;gt;2&amp;lt;/parm2&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;parm3&amp;gt;20&amp;lt;/parm3&amp;gt;&lt;/P&gt;&lt;P&gt;   &amp;lt;/row&amp;gt;&lt;/P&gt;&lt;P&gt;   &amp;lt;row&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;parm1&amp;gt;Z&amp;lt;/parm1&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;parm2&amp;gt;3&amp;lt;/parm2&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;parm3&amp;gt;30&amp;lt;/parm3&amp;gt;&lt;/P&gt;&lt;P&gt;   &amp;lt;/row&amp;gt;&lt;/P&gt;&lt;P&gt;   &amp;lt;row&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;parm1&amp;gt;A&amp;lt;/parm1&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;parm2&amp;gt;4&amp;lt;/parm2&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;parm3&amp;gt;40&amp;lt;/parm3&amp;gt;&lt;/P&gt;&lt;P&gt;   &amp;lt;/row&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/ns0:test1&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result: after using satish's condition... Check if parm1 is equal to 'A' then createif.&lt;/P&gt;&lt;P&gt;But i had to change the context of parm1 to higher level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;ns0:test2 xmlns:ns0="urn:cop-city:test"&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;stmt&amp;gt;&lt;/P&gt;&lt;P&gt;	&amp;lt;access&amp;gt;&lt;/P&gt;&lt;P&gt;	&amp;lt;parm2&amp;gt;2&amp;lt;/parm2&amp;gt;&lt;/P&gt;&lt;P&gt;	&amp;lt;parm3&amp;gt;20&amp;lt;/parm3&amp;gt;&lt;/P&gt;&lt;P&gt;	&amp;lt;/access&amp;gt;&lt;/P&gt;&lt;P&gt;	&amp;lt;access&amp;gt;&lt;/P&gt;&lt;P&gt;	&amp;lt;parm2&amp;gt;4&amp;lt;/parm2&amp;gt;&lt;/P&gt;&lt;P&gt;	&amp;lt;parm3&amp;gt;40&amp;lt;/parm3&amp;gt;&lt;/P&gt;&lt;P&gt;	&amp;lt;/access&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/stmt&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/ns0:test2&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Satish thanks for thesuggestion.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2007 00:42:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/xi-mapping-filter-rows-based-on-source-field-value/qaa-p/2390398#M1025344</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-07T00:42:16Z</dc:date>
    </item>
  </channel>
</rss>

