<?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 ABAP CDS Consumption.derivation error Default cannot be determined (depends on user input) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-cds-consumption-derivation-error-default-cannot-be-determined-depends/m-p/11931472#M1964685</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;While trying to utilise the functionality of Consumption.derivation I have encountered the following error:&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/storage/blog_attachments/2017/08/Erorr.png" /&gt;&lt;/P&gt;
  &lt;P&gt;Here’s my &lt;STRONG&gt;MAIN_VIEW&lt;/STRONG&gt; with consumption derivation for parameter &lt;STRONG&gt;p_fromDate&lt;/STRONG&gt; which should look up for a value in the view &lt;STRONG&gt;SUPPORTING_VIEW &lt;/STRONG&gt;using binding value based on parameter &lt;STRONG&gt;p_startDate&lt;/STRONG&gt; defined in the &lt;STRONG&gt;MAIN_VIEW.&lt;/STRONG&gt;&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;define view MAIN_VIEW with parameters
@AnalyticsDetails.query.variableSequence: 1
p_startDate: abap.dats,
@AnalyticsDetails.query.variableSequence: 2
@Consumption.derivation: {lookupEntity: 'SUPPORTING_VIEW', resultElement: 'fromDate', binding: [{targetParameter: 'p_startCalculationDate', type: #PARAMETER, value: 'p_startDate' }]}
p_fromDate: abap.dats,&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Here’s my &lt;STRONG&gt;SUPPORTING_VIEW &lt;STRONG&gt;&lt;STRONG&gt;which should be supplied with parameter&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&lt;STRONG&gt; p_star_date from the&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&lt;STRONG&gt; MAIN_VIEW.&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;define view SUPPORTING_VIEW
with parameters p_startCalculationDate: abap.dats
 as select from TABLE_FUNCTION( p_startCalculationDate: $parameters.p_startCalculationDate ) {
    
    
     fromDate, 
     toDate
     
}&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;The error occurs while I try to activate the &lt;STRONG&gt;MAIN_VIEW.&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;I tried to test this functionality a bit more in different scenarios to debug my problem and I noticed that e.g. it all works fine if I change the binding value to #CONSTANT and provide value manually:&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;@Consumption.derivation: {lookupEntity: 'SUPPORTING_VIEW', resultElement: 'fromDate', binding: [{targetParameter: 'p_startCalculationDate', type: #CONSTANT, value: '20190101' }]}
p_fromDate: abap.dats,&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Have anyone encountered and solved the problem with this error?&lt;/P&gt;
  &lt;P&gt;BR,&lt;/P&gt;
  &lt;P&gt;Mateusz.&lt;/P&gt;</description>
    <pubDate>Thu, 04 Jul 2019 13:33:08 GMT</pubDate>
    <dc:creator>MateuszTrojanow</dc:creator>
    <dc:date>2019-07-04T13:33:08Z</dc:date>
    <item>
      <title>ABAP CDS Consumption.derivation error Default cannot be determined (depends on user input)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-cds-consumption-derivation-error-default-cannot-be-determined-depends/m-p/11931472#M1964685</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;While trying to utilise the functionality of Consumption.derivation I have encountered the following error:&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/storage/blog_attachments/2017/08/Erorr.png" /&gt;&lt;/P&gt;
  &lt;P&gt;Here’s my &lt;STRONG&gt;MAIN_VIEW&lt;/STRONG&gt; with consumption derivation for parameter &lt;STRONG&gt;p_fromDate&lt;/STRONG&gt; which should look up for a value in the view &lt;STRONG&gt;SUPPORTING_VIEW &lt;/STRONG&gt;using binding value based on parameter &lt;STRONG&gt;p_startDate&lt;/STRONG&gt; defined in the &lt;STRONG&gt;MAIN_VIEW.&lt;/STRONG&gt;&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;define view MAIN_VIEW with parameters
@AnalyticsDetails.query.variableSequence: 1
p_startDate: abap.dats,
@AnalyticsDetails.query.variableSequence: 2
@Consumption.derivation: {lookupEntity: 'SUPPORTING_VIEW', resultElement: 'fromDate', binding: [{targetParameter: 'p_startCalculationDate', type: #PARAMETER, value: 'p_startDate' }]}
p_fromDate: abap.dats,&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Here’s my &lt;STRONG&gt;SUPPORTING_VIEW &lt;STRONG&gt;&lt;STRONG&gt;which should be supplied with parameter&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&lt;STRONG&gt; p_star_date from the&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&lt;STRONG&gt; MAIN_VIEW.&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;define view SUPPORTING_VIEW
with parameters p_startCalculationDate: abap.dats
 as select from TABLE_FUNCTION( p_startCalculationDate: $parameters.p_startCalculationDate ) {
    
    
     fromDate, 
     toDate
     
}&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;The error occurs while I try to activate the &lt;STRONG&gt;MAIN_VIEW.&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;I tried to test this functionality a bit more in different scenarios to debug my problem and I noticed that e.g. it all works fine if I change the binding value to #CONSTANT and provide value manually:&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;@Consumption.derivation: {lookupEntity: 'SUPPORTING_VIEW', resultElement: 'fromDate', binding: [{targetParameter: 'p_startCalculationDate', type: #CONSTANT, value: '20190101' }]}
p_fromDate: abap.dats,&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Have anyone encountered and solved the problem with this error?&lt;/P&gt;
  &lt;P&gt;BR,&lt;/P&gt;
  &lt;P&gt;Mateusz.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2019 13:33:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-cds-consumption-derivation-error-default-cannot-be-determined-depends/m-p/11931472#M1964685</guid>
      <dc:creator>MateuszTrojanow</dc:creator>
      <dc:date>2019-07-04T13:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP CDS Consumption.derivation error Default cannot be determined (depends on user input)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-cds-consumption-derivation-error-default-cannot-be-determined-depends/m-p/11931473#M1964686</link>
      <description>&lt;P&gt;i dont have 7.5 system to try, can you try @Consumption.hidden = false before p_startDate?&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2019 05:19:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-cds-consumption-derivation-error-default-cannot-be-determined-depends/m-p/11931473#M1964686</guid>
      <dc:creator>DoanManhQuynh</dc:creator>
      <dc:date>2019-07-08T05:19:02Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP CDS Consumption.derivation error Default cannot be determined (depends on user input)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-cds-consumption-derivation-error-default-cannot-be-determined-depends/m-p/11931474#M1964687</link>
      <description>&lt;P&gt;Hello Quynh Doan Manh,&lt;/P&gt;&lt;P&gt;The addition you had suggested in your answer, helped.&lt;/P&gt;&lt;P&gt;Do you know why it's necessary to hide the parameter? The documentation doesn't mention it.&lt;/P&gt;&lt;P&gt;(I would mark your asnwer as correct, but you submitted it as a comment).&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2019 13:41:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-cds-consumption-derivation-error-default-cannot-be-determined-depends/m-p/11931474#M1964687</guid>
      <dc:creator>MateuszTrojanow</dc:creator>
      <dc:date>2019-07-08T13:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP CDS Consumption.derivation error Default cannot be determined (depends on user input)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-cds-consumption-derivation-error-default-cannot-be-determined-depends/m-p/11931475#M1964688</link>
      <description>&lt;P&gt;sorry I don't have answer for this question, it just a feeling that annotation @Consumption.hidden could be the trick. lets other expert look at this :).&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2019 00:19:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-cds-consumption-derivation-error-default-cannot-be-determined-depends/m-p/11931475#M1964688</guid>
      <dc:creator>DoanManhQuynh</dc:creator>
      <dc:date>2019-07-09T00:19:13Z</dc:date>
    </item>
  </channel>
</rss>

