<?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 - Date calculation in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/cds-date-calculation/m-p/11146855#M1906586</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Usage of a parameter could serve as workaround:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;define view ...&lt;/P&gt;&lt;P&gt;&amp;nbsp; with parameters&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sydat : abap.dats @&amp;lt;Environment.systemField: #SYSTEM_DATE&lt;/P&gt;&lt;P&gt;&amp;nbsp; as select from svers&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; dats_days_between( $parameters.sydat, $parameters.sydat ) as delta&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or a join with another view (wrapping $session.system_date as column)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;define view ...&lt;/P&gt;&lt;P&gt;&amp;nbsp; as select from svers&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; $session.system_date as system_date&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Sep 2016 12:08:41 GMT</pubDate>
    <dc:creator>christian_seitel</dc:creator>
    <dc:date>2016-09-13T12:08:41Z</dc:date>
    <item>
      <title>CDS - Date calculation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cds-date-calculation/m-p/11146851#M1906582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to do som calculation with date type fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@AbapCatalog.sqlViewName: 'ZDEMOSDN'&lt;/P&gt;&lt;P&gt;@EndUserText.label: 'test'&lt;/P&gt;&lt;P&gt;define view ZDEMOSDN as select from aufk as a inner join afko as b&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; on a.aufnr = b.aufnr &lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; key a.aufnr,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; a.erdat - a.idat2 as date2&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I'm getting the error messages:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG&gt;Data type DATS is currently not supported in an arithmetic expression&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Will this be supported in near future? Is there kind of workaround &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_emote jive_macro" src="https://community.sap.com/1322/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Bart&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2015 14:36:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cds-date-calculation/m-p/11146851#M1906582</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-07-20T14:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: CDS - Date calculation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cds-date-calculation/m-p/11146852#M1906583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are functions like&lt;/P&gt;&lt;P&gt;dats_is_valid&lt;/P&gt;&lt;P&gt;dats_days_between&lt;/P&gt;&lt;P&gt;dats_add_days&lt;/P&gt;&lt;P&gt;dats_add_months&lt;/P&gt;&lt;P&gt;If they are not available yet in your current SP-release then there is no workaround as date-time calculations are very complex (just think of leap years or things like that)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2015 07:53:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cds-date-calculation/m-p/11146852#M1906583</guid>
      <dc:creator>christian_seitel</dc:creator>
      <dc:date>2015-07-22T07:53:47Z</dc:date>
    </item>
    <item>
      <title>Re: CDS - Date calculation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cds-date-calculation/m-p/11146853#M1906584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks Christian. Unfortunately&lt;BR /&gt;not available, because of SP-release.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bart&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2015 14:58:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cds-date-calculation/m-p/11146853#M1906584</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-07-27T14:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: CDS - Date calculation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cds-date-calculation/m-p/11146854#M1906585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;H6 style="font-weight: normal; font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;SPAN class="j-post-author" style="font-size: 0.9em; color: #333333; background: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-size: 10.8px; font-family: inherit; background: transparent;"&gt;Hi &lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" data-avatarid="64588" data-externalid="" data-presence="null" data-userid="4913" data-username="christian.seitel" href="https://answers.sap.com/people/christian.seitel" style="padding: 0 3px 0 0; font-weight: inherit; font-style: inherit; font-size: 1.1em; font-family: inherit; color: #3778c7; background: transparent;"&gt;Christian Seitel,&lt;/A&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/H6&gt;&lt;P&gt;&lt;SPAN class="j-post-author" style="font-size: 0.9em; color: #333333; background: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-size: 10.8px; font-family: inherit; background: transparent;"&gt;can we use $session.system_date as one of the parameter to &lt;SPAN style="color: #333333; font-size: 12px;"&gt;dats_days_between function.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-post-author" style="font-size: 0.9em; color: #333333; background: #ffffff;"&gt;&lt;STRONG style="color: #333333; font-style: inherit; background: transparent; font-size: 12px; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-post-author" style="font-size: 0.9em; color: #333333; background: #ffffff;"&gt;&lt;STRONG style="color: #333333; font-style: inherit; background: transparent; font-size: 12px; font-family: inherit;"&gt;I tried it in cds view, I the following error&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-post-author" style="font-size: 0.9em; color: #333333; background: #ffffff;"&gt;&lt;STRONG style="color: #333333; font-style: inherit; background: transparent; font-size: 12px; font-family: inherit;"&gt;Function DATS_DAYS_BETWEEN: At position&amp;nbsp; 2, only Expressions,Literals,Columns,Paths,Parameters allowed&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-post-author" style="font-size: 0.9em; color: #333333; background: #ffffff;"&gt;&lt;STRONG style="color: #333333; font-style: inherit; background: transparent; font-size: 12px; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-post-author" style="font-size: 0.9em; color: #333333; background: #ffffff;"&gt;&lt;STRONG style="color: #333333; font-style: inherit; background: transparent; font-size: 12px; font-family: inherit;"&gt;please help me on this. &lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Aug 2016 10:35:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cds-date-calculation/m-p/11146854#M1906585</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-08-16T10:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: CDS - Date calculation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cds-date-calculation/m-p/11146855#M1906586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Usage of a parameter could serve as workaround:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;define view ...&lt;/P&gt;&lt;P&gt;&amp;nbsp; with parameters&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sydat : abap.dats @&amp;lt;Environment.systemField: #SYSTEM_DATE&lt;/P&gt;&lt;P&gt;&amp;nbsp; as select from svers&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; dats_days_between( $parameters.sydat, $parameters.sydat ) as delta&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or a join with another view (wrapping $session.system_date as column)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;define view ...&lt;/P&gt;&lt;P&gt;&amp;nbsp; as select from svers&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; $session.system_date as system_date&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Sep 2016 12:08:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cds-date-calculation/m-p/11146855#M1906586</guid>
      <dc:creator>christian_seitel</dc:creator>
      <dc:date>2016-09-13T12:08:41Z</dc:date>
    </item>
  </channel>
</rss>

