Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ATC error using @Consumption.Derivation in CDS View

former_member230443
Participant
2,394

Hi,

I am using the following consumption derivation:

@Consumption:{

derivation:{

lookupEntity:'C_GregorianCalDateFunction',

resultElement:'DateFunctionStartDate',

binding: [

{targetParameter:'P_DateFunction',type:#PARAMETER,value:'P_DateFunction'},

{targetParameter:'P_Language',type:#SYSTEM_FIELD,value:'#SYSTEM_LANGUAGE'} ] },

hidden:true

}

P_StartDate : datum


It works fine, but I run into following ATC error. I am able to make out how to correct this. Please help fix this issue.


Details of Analysis

Element 'DateFunctionStartDate' for 'Consumption.derivation.resultElement' not found

What is the Intent of the Message / Rule?

Referenced element doesn't exist.

How to Resolve Violations?

Use an existing select list entry or association.

What is the Intent of the Check?

This check reports usages of not existing elements, parameters, associations within annotations values with following types: elementRef, keyElementRef, parameterRef and associationRef.

Thanks,

Vimal

1 ACCEPTED SOLUTION
Read only

former_member230443
Participant
1,903

This is a false positive confirmed by the CDS team

Hi,

I am using the following consumption derivation:

@Consumption:{

derivation:{

lookupEntity:'C_GregorianCalDateFunction',

resultElement:'DateFunctionStartDate',

binding: [

{targetParameter:'P_DateFunction',type:#PARAMETER,value:'P_DateFunction'},

{targetParameter:'P_Language',type:#SYSTEM_FIELD,value:'#SYSTEM_LANGUAGE'} ] },

hidden:true

}

P_StartDate : datum


It works fine, but I run into following ATC error. I am able to make out how to correct this. Please help fix this issue.


Details of Analysis

Element 'DateFunctionStartDate' for 'Consumption.derivation.resultElement' not found

What is the Intent of the Message / Rule?

Referenced element doesn't exist.

How to Resolve Violations?

Use an existing select list entry or association.

What is the Intent of the Check?

This check reports usages of not existing elements, parameters, associations within annotations values with following types: elementRef, keyElementRef, parameterRef and associationRef.

Thanks,

Vimal

3 REPLIES 3
Read only

DoanManhQuynh
Active Contributor
0 Likes
1,903

so is that element exists in the entity you are looking up?

Read only

former_member230443
Participant
0 Likes
1,903

Yes, the field DateFunctionStartDate does exist in the look up view C_GregorianCalDateFunction

Read only

former_member230443
Participant
1,904

This is a false positive confirmed by the CDS team