cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Value help is displaying by using @Consumption.valueHelpDefinition:

durgaprasanth_vemula
Participant
33,001

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

Accepted Solutions (0)

Answers (5)

Answers (5)

mdcastle
Active Participant

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?

durgaprasanth_vemula
Participant
0 Kudos

mark_castle

Hi Mark,

As per your suggestion i had added the @ObjectModel.foreignKey.association:'_zi_doctype' and also done the @Odata.publish: false, then re-activating with @OData.publish: true. but still it is not appearing.

1)

2)Please find the ODATA Service metadata

mdcastle
Active Participant
0 Kudos

I’m out of ideas. The only thing I can think is that you’re seeing a cache issue in your browser, or the local metadata is out of sync.

durgaprasanth_vemula
Participant
0 Kudos

@Mark Castle

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?

mdcastle
Active Participant
0 Kudos

I’ve never found a way in which it refreshes every time to be honest. The easiest way is to copy the metadata from your /ifwnd/maint_service version and manually update the file in BAS.

durgaprasanth_vemula
Participant
0 Kudos

@mark_castle

Hi Mark,

I found the below link and able to refresh now.

https://help.sap.com/viewer/17d50220bcd848aa854c9c182d65b699/Latest/en-US/8182ff3b19574f038bd636b999....

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.

mdcastle
Active Participant
0 Kudos

I already suggested you do that

durgaprasanth_vemula
Participant
0 Kudos

@Mark Castle

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.

andrassoos
Explorer
0 Kudos

Hi @durgaprasanth_vemula ,

 

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

durgaprasanth_vemula
Participant
0 Kudos

@mark_castle

Hi Mark,

please find the screen shot of ODATA Metadata.

1)

2)

3)

durgaprasanth_vemula
Participant
0 Kudos

@Mark Castle

1)

2)

3)

4)

durgaprasanth_vemula
Participant
0 Kudos

@Mark Castle

local metadata.xml file in webapp->localService folder and also refreshed your Data Source in manifest (right click manifest.json -> Open Service Manager (if using BAS))

1)

2)

durgaprasanth_vemula
Participant
0 Kudos

@Mark Castle

Hi Mark,

Could you please help me on this as I had put all screen shots as you have requested.

Thanks

Durga Prasanth

mdcastle
Active Participant
0 Kudos

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
durgaprasanth_vemula
Participant
0 Kudos

mark_castle

Hi Mark,

As per your instruction i had tried but still it is not displaying and please find the below screen shots in details.

durgaprasanth_vemula
Participant
0 Kudos

@mark_castle

Hi Mark,

But still it is same issue after following your instructions.

mdcastle
Active Participant
0 Kudos

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)).

mdcastle
Active Participant
0 Kudos

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'
durgaprasanth_vemula
Participant
0 Kudos

@mark_castle

Hi Mark,

Please find the below screen and i had not given any association between ZI_DOCUMENTTYPE_VH is defined in ZI_POSTINGS_R1V2.

But as per the below screen shot i had used for the ZI_COMPANYCODE_VH and it is displaying perfectly fine for the Cmpany Code


durgaprasanth_vemula
Participant
0 Kudos

@mark_castle

Hi Mark,

As you had asked me to do the change and i had done the change but still nothing is displaying.

mdcastle
Active Participant
0 Kudos

Are you sure that the BUKRS Value Help isn't coming from the value help on the field from the database table, rather than ZI_COMPANYCODE_VH?

durgaprasanth_vemula
Participant
0 Kudos

@mark_castle

Hi,

I am getting those values in F4 which are there in the ZI_COMPANYCODE_VH. but i am not able to understand why it is not working for ZI_DOCUMENTTYPE_VH.

durgaprasanth_vemula
Participant
0 Kudos

@Mark Castle

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.