<?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: Handling Null Values in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/handling-null-values/qaa-p/11938887#M4486458</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abhishek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Add one more layer of validation and check-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First use exist() node function and then check whether the value is null or not null.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Apu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Sep 2016 11:05:04 GMT</pubDate>
    <dc:creator>apu_das2</dc:creator>
    <dc:date>2016-09-26T11:05:04Z</dc:date>
    <item>
      <title>Handling Null Values</title>
      <link>https://community.sap.com/t5/technology-q-a/handling-null-values/qaq-p/11938885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi SDNites,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting multiple &amp;lt;null&amp;gt; values in a field in the source structure where all other fields for that records have values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is in case value is null (field not present in IDOC sent from SAP to PI), I would map it with default value in the target. I have tried to use mapwithdefault function but it is not recognising the null values. Also I tried to write the UDF but with in UDF when I use loop with condition input.length then this loop is not working as input.length is also not recognising the null values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please guide how can I achieve the same in SAP PI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Abhishek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Sep 2016 10:23:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/handling-null-values/qaq-p/11938885</guid>
      <dc:creator>itabhishek9</dc:creator>
      <dc:date>2016-09-26T10:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: Handling Null Values</title>
      <link>https://community.sap.com/t5/technology-q-a/handling-null-values/qaa-p/11938886#M4486457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abhishek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The mapWithDefault will work.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/1043195" /&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Praveen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Sep 2016 10:44:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/handling-null-values/qaa-p/11938886#M4486457</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-09-26T10:44:44Z</dc:date>
    </item>
    <item>
      <title>Re: Handling Null Values</title>
      <link>https://community.sap.com/t5/technology-q-a/handling-null-values/qaa-p/11938887#M4486458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abhishek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Add one more layer of validation and check-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First use exist() node function and then check whether the value is null or not null.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Apu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Sep 2016 11:05:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/handling-null-values/qaa-p/11938887#M4486458</guid>
      <dc:creator>apu_das2</dc:creator>
      <dc:date>2016-09-26T11:05:04Z</dc:date>
    </item>
    <item>
      <title>Re: Handling Null Values</title>
      <link>https://community.sap.com/t5/technology-q-a/handling-null-values/qaa-p/11938888#M4486459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;even more easy is use remove context , it will make all null become [] and then do splitbyvalue - each value&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Sep 2016 11:11:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/handling-null-values/qaa-p/11938888#M4486459</guid>
      <dc:creator>vicky20691</dc:creator>
      <dc:date>2016-09-26T11:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: Handling Null Values</title>
      <link>https://community.sap.com/t5/technology-q-a/handling-null-values/qaa-p/11938889#M4486460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abhishek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the field context is set to its parent node then its not an issue. mapWithDefault will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/1043206" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you make entire value of the field in one context that time it wont work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/1043228" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Solution to handle the above situation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/1043205" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like in the above example, You can solve it source Node- mapWithDefault-removeContext-target Node&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will be helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sagarika&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Sep 2016 11:20:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/handling-null-values/qaa-p/11938889#M4486460</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-09-26T11:20:36Z</dc:date>
    </item>
    <item>
      <title>Re: Handling Null Values</title>
      <link>https://community.sap.com/t5/technology-q-a/handling-null-values/qaa-p/11938890#M4486461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks everybody for your response. It has been resolved now and have used mapwithdefaults function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Sep 2016 12:27:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/handling-null-values/qaa-p/11938890#M4486461</guid>
      <dc:creator>itabhishek9</dc:creator>
      <dc:date>2016-09-26T12:27:11Z</dc:date>
    </item>
  </channel>
</rss>

