on 2021 Apr 12 10:05 AM
Hi,
I am using Value help is displaying by using @Consumption.valueHelpDefinition: but it is not displaying and please find the below code.
1)I had created the below CDS View to get the list of Document Types

2)In the below CDS View i am using Annotation @Consumption.valueHelpDefinition: and given element and name(CDS View name)

3) As per the below screen still appearing as normal which should appear as valuehelp

Request clarification before answering.
Try adding
@ObjectModel.foreignKey.association: '_zi_doctype'above blart in your Composite View.
However, looking at your OData service i would have expected to see an entry similar to the Company Code Value Help starting with
<EntityType Name="ZI_DOCUMENTTYPE_VH2"so it looks like something is missing in the OData service. Have you tried re-publishing the OData service by activating the view with @Odata.publish: false, then re-activating with @OData.publish: true?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mark,
The metadata.xml file in the LocalService in the Business Application Studio is not getting refreshed and it is not sync and that is the reason Valuehelp is not working.
As per the below screen the changes are reflecting and could you please tell me how to sync.
Note:I found the below issue because when i again created a New Fiori App and fetch the ODATA service and Valuehelp is working.
Now my issue is how the metadata.xml will be sync in Business Application Studio?

@mark_castle
Hi Mark,
I found the below link and able to refresh now.
But still facing one more issue i.e "ValueListProvider - Missing primary ValueListAnnotation for ZC_POSTINGS_R2_CDS.ZC_POSTINGS_R2Type/BLART "

2)Please find the below which i had added to display Visual Filter and any thing more I need to add the below.

Hi Mark,
yes you are right and now Metadata is getting refreshed could you please help me facing another issue.
But still facing one more issue i.e "ValueListProvider - Missing primary ValueListAnnotation for ZC_POSTINGS_R2_CDS.ZC_POSTINGS_R2Type/BLART "

2)Please find the below which i had added to display Visual Filter and any thing more I need to add the below.

did you find a solution? I have the same issue, I want to use a VH with more fields, but only the @ObjectModel.foreignKey.association which is working. With that, only description can be shown, nothing else.
Thanks in advance.
br,
Andras
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Create your value help e.g.
@AbapCatalog.sqlViewName: 'ZVHSALESORDTYPE'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Sales Order Types VH'
@ObjectModel.resultSet.sizeCategory: #XS
@Search.searchable: true
define view ZCDS_VH_SALES_ORDER_TYPES
as select from tvakt
{
@Search.defaultSearchElement: true
@ObjectModel.text.element: ['SalesOrderDescription']
key auart,
@Semantics.text: true
bezei as SalesOrderDescription
}
where
spras = 'E'In your composite view
association [1] to ZCDS_VH_SALES_ORDER_TYPES as _SalesOrderVH on $projection.auart = _SalesOrderVH.auart
......
@ObjectModel.text.element: ['SalesOrderDescription']
auart,
@Semantics.text: true
@EndUserText.label: 'Sales Order Type'
_SalesOrderVH.SalesOrderDescription,
......
_SalesOrderVH,In your consumption view
@Consumption.valueHelp: '_SalesOrderVH'
auart
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Post a screenshot of your OData service metadata showing the relevant fields and the association section. Also the local metadata.xml file in webapp->localService folder. Also, make sure that you have refreshed your Data Source in manifest (right click manifest.json -> Open Service Manager (if using BAS)).
Try something like this for your Value Help
@AbapCatalog.sqlViewName: 'ZVHSALESORDTYPE'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Sales Order Types VH'
@ObjectModel.resultSet.sizeCategory: #XS
@Search.searchable: true
define view ZCDS_VH_SALES_ORDER_TYPES
as select from tvakt
{
@Search.defaultSearchElement: true
@ObjectModel.text.element: ['SalesOrderDescription']
key auart,
@Semantics.text: true
bezei as SalesOrderDescription
}
where
spras = 'E'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mark,
I found out why for the ZI_COMPANYCODE_VH value is coming because for the field BUKRS there is search help and for the blart field there is no search help and can i know how to proceed.

but for field Blart there is not search help.

| User | Count |
|---|---|
| 17 | |
| 8 | |
| 7 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.