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

CDS value help doesn't work

Former Member
0 Likes
11,768

I have a main CDS view for smart Fiori app. In that CDS there are 2 association. If use for the same field first associated CDS value help works, but if i change to another - doesn't work. I can't understand the difference and why it doesn't work:

Looks something like (for CRH everything works, for f4 - no

)

12 REPLIES 12
Read only

Former Member
0 Likes
7,395

Hey Aliaksandr

Is it possible the join connection has no data

I see in the F4 statement you are writing $project.dn_no is it correct or should it be $project.doc_no?

This is a custom logic so not sure if it is something that can be checked without looking into the system

regards

Vinita

Read only

0 Likes
7,395

If i check it in Development tool, i see data. And may be you know, if there is no data F4 help window should looks like (for F4 CDS):

Or even if there is no data it should looks like on this window, but after clicking GO button i will see nothing (for CRH CDS)?

Read only

maheshpalavalli
Active Contributor
0 Likes
7,395

Have you used the below annotation?

      @Consumption.valueHelp: '_carr'  // This is your association name

This works for me, hope for you as well.

BR,

Mahesh

Read only

0 Likes
7,395

It works the same as in my example. With one CDS ok, with another - no. And i can't understand what is wrong with second CDS ((

Read only

0 Likes
7,395

Can you please share the code where it is not working (including the code where you added the annotaiton that I've mentioned).

BR,

Mahesh

Read only

0 Likes
7,395

Behavior is the same (

here is an example of ztest_f4_dn_no CDS:

Read only

0 Likes
7,395

Hi Aliaksandr Likhach,

I was checking the SAP help and found there are two ways to do it.. I couldn't understand the second way sadly 😞 .

But the first way is what you are doing right now and SAP help says "The ON condition of the referenced association specifies how the value help content needs to be retrieved for the element."

So in your case, you can see the on condition is on 'doc_no' for the value help but not the 'dn_no'.. So what you can do is create a specific F4 help for the dn_no, where it fetches only the dn_no.. else put both of them in on condition(join condition).. It should work after that i guess..

BR,

Mahesh

Read only

0 Likes
7,395

So, we have found the reason. F4 CDS wasn't in service definition. So we've added it in the SEGW and then wrote in main CDS

@Consumption.valueHelpDefinition: [{ entity: { name: 'ztest_f4...', element: 'dn_no' } }]

end now everything works super!

Read only

VincentBloem
Participant
7,395

check your manifest file,

delete

"metadataUrlParams": { "sap-value-list": "none" }

from your model

Hope this helps!

KR,

Vincent

Read only

7,395

vincentbloem : This helped me to get the Value Help results in WebIDE.

Thanks for sharing !

Read only

0 Likes
7,395

Thank you vincentbloem for this comment.

You are genius.

I spent 2 days and didn't understand why valueHelp doesn't work.

Could you please explain what's the influence of "metadataUrlParams": { "sap-value-list": "none" }?

Have a good day.

Read only

roberto_forti
Contributor
0 Likes
7,395

Hi, implement @Consumption.valueHelpDefinition: [{ entity : {name: 'customer', element: 'customerID' } }]