<?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>topic Re: CDS View - Coalesce and case statement not working in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-coalesce-and-case-statement-not-working/m-p/12372203#M1993712</link>
    <description>&lt;P&gt;Coalesce only works if the value is null, which is currently only possible within a Join. &lt;/P&gt;&lt;P&gt;The Case should work through. I'm currently only at the Phone but is there something like "initial" or is that value not an empty string? In CDS there is much less automatik data type conversion which is also valid for constants. &lt;/P&gt;</description>
    <pubDate>Sun, 28 Feb 2021 09:32:15 GMT</pubDate>
    <dc:creator>BiberM</dc:creator>
    <dc:date>2021-02-28T09:32:15Z</dc:date>
    <item>
      <title>CDS View - Coalesce and case statement not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-coalesce-and-case-statement-not-working/m-p/12372202#M1993711</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;
  &lt;P&gt;I have developed a CDS view and one of the column in it is of Bill of Lading(BOLNR).&lt;/P&gt;
  &lt;P&gt;&lt;BR /&gt;My requirement is to put '#' if BOLNR is initial. I tried with Coalesce and Case Statement with below code but it is not working as expected.&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Code1 - coalesce( _likp.bolnr, '#' ) as bolnr,&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Code2- cast ( case when _likp.bolnr = ' ' then '#' else _likp.bolnr end as bolnr) as bolnr.&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;Is there any other away to achieve the above requirement in CDS View?&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 28 Feb 2021 08:14:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-coalesce-and-case-statement-not-working/m-p/12372202#M1993711</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2021-02-28T08:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: CDS View - Coalesce and case statement not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-coalesce-and-case-statement-not-working/m-p/12372203#M1993712</link>
      <description>&lt;P&gt;Coalesce only works if the value is null, which is currently only possible within a Join. &lt;/P&gt;&lt;P&gt;The Case should work through. I'm currently only at the Phone but is there something like "initial" or is that value not an empty string? In CDS there is much less automatik data type conversion which is also valid for constants. &lt;/P&gt;</description>
      <pubDate>Sun, 28 Feb 2021 09:32:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-coalesce-and-case-statement-not-working/m-p/12372203#M1993712</guid>
      <dc:creator>BiberM</dc:creator>
      <dc:date>2021-02-28T09:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: CDS View - Coalesce and case statement not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-coalesce-and-case-statement-not-working/m-p/12372204#M1993713</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;What is the error message you get?&lt;/P&gt;&lt;P&gt;Or is it just not producing the expected results?&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Mateusz&lt;/P&gt;</description>
      <pubDate>Sun, 28 Feb 2021 09:37:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-coalesce-and-case-statement-not-working/m-p/12372204#M1993713</guid>
      <dc:creator>MateuszAdamus</dc:creator>
      <dc:date>2021-02-28T09:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: CDS View - Coalesce and case statement not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-coalesce-and-case-statement-not-working/m-p/12372205#M1993714</link>
      <description>&lt;P&gt;This works right?&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;cast ( case when likp.bolnr = ' ' then '#' else likp.bolnr end as bolnr ) as test1&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;or if it is an older version, this also works, you don't need cast.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;case when likp.bolnr = '' then '#' else likp.bolnr end as test&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and tell us what is not working as well.&lt;/P&gt;</description>
      <pubDate>Sun, 28 Feb 2021 12:33:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-coalesce-and-case-statement-not-working/m-p/12372205#M1993714</guid>
      <dc:creator>maheshpalavalli</dc:creator>
      <dc:date>2021-02-28T12:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: CDS View - Coalesce and case statement not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-coalesce-and-case-statement-not-working/m-p/12372206#M1993715</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;the issues with Coalesce and Case is, for some records which are blank, it is working as expected. But some it is showing blank.&lt;/P&gt;&lt;P&gt;Is it because BOLNR is CHAR35 and having Numeric as well as Alphabetical records?&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 08:26:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-coalesce-and-case-statement-not-working/m-p/12372206#M1993715</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2021-03-01T08:26:41Z</dc:date>
    </item>
    <item>
      <title>Re: CDS View - Coalesce and case statement not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-coalesce-and-case-statement-not-working/m-p/12372207#M1993716</link>
      <description>&lt;P&gt;Hi Mahesh,&lt;/P&gt;&lt;P&gt;By using Case or Coalesce, it is working for some records, but not for all records. Please see below screen shots:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 08:31:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-coalesce-and-case-statement-not-working/m-p/12372207#M1993716</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2021-03-01T08:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: CDS View - Coalesce and case statement not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-coalesce-and-case-statement-not-working/m-p/12372208#M1993717</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;For Some records if you use either a case or coalesce it is working but for some records its not working.&lt;A href="https://answers.sap.com/storage/temp/1895605-blank-bolnr.png"&gt;blank-bolnr.png&lt;/A&gt;&lt;A href="https://answers.sap.com/storage/temp/1895606-non-blank-bolnr.png"&gt;non-blank-bolnr.png&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Please refer Attachments for more clarification on the issue.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 08:39:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-coalesce-and-case-statement-not-working/m-p/12372208#M1993717</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2021-03-01T08:39:42Z</dc:date>
    </item>
  </channel>
</rss>

