cancel
Showing results for 
Search instead for 
Did you mean: 

Filter smartfield's value help based on user input in sap fiori

janani_10
Explorer
0 Kudos

I have a requirement - In a smartform, I am having 2 smartfields with F4 help. On selecting field 1 - purchasae org, the field2 -vendor fields's valuehelp should get filtered based on selected Purchase Org. But when i try the same in my local annotation file using valueListParameterIn, it's not getting filtered. I tried this from CDS annotation(additionalBinding) as well, which is also not working. When trying through CDS annotation, the generated annotations for valuehelp is not containg the ValueListParameterIn property. Any inputs will help.

Attaching the code below.

@Consumption.valueHelpDefinition: [
{ entity: { name: 'C_RegionVH', element: 'Region' }},
{additionalBinding: [{ element: 'Country', localElement: 'Country' }]}
]

References followed:

Implementing Filter dependency between Selection Fields in CDS based Fiori Application

Smart Field with Value Help and Hidden Filter

Thanks in Advance,

Janani

junwu
Active Contributor
0 Kudos

what's the main entity, which contains vendor_number?

janani_10
Explorer
0 Kudos

The main entity which contains vendor_ number is specified in the collectionpath property of the valuehep. z*****_vendor

junwu
Active Contributor
0 Kudos

no, i don't think you get it.

you have to annotate the main entity attribute.

janani_10
Explorer
0 Kudos

Hi jun.wu5 ,

Thanks for your reply. I have associated the valuehelp cds to the main cds. Below is the metadata

View Entire Topic
junwu
Active Contributor
0 Kudos

to me, you are not getting the point.

you have to annotate the vendor_Number of your main entity, from the screenshot , you are annotating the vendor_number of the valuehelp.

if ***tensType is your main entity, your annotation target regarding valuehelp should be ***tensType/vendor_number

janani_10
Explorer
0 Kudos

Hi jun.wu5

The main entity is ****vendorType and hence the valuehelp target ****vendorType/vendor_number.

The valuehelp is working. But the additionalbinding or filtering vendor valuehelp based on the selected purchase organization is not working.