cancel
Showing results for 
Search instead for 
Did you mean: 

Value Help in Custom Entity CDS

former_member207873
Participant
0 Kudos

Hello Experts,

I have created a custom entity for which I need a value help. I have the same pattern Custom Entity CDS as mentioned in the below blog.

How to implement a custom entity in the ABAP RESTful Programming Model using remote function modules...

<code>@EndUserText.label: 'product demo data read via rfc from on prem'
@ObjectModel: {
    query: {
        implementedBy: 'ABAP:zcl_cq_product_via_rfc'
    }
}

define root custom entity ZCE_Product_via_RFC
{
      @UI.facet     : [
           {
             id     :       'Product',
             purpose:  #STANDARD,
             type   :     #IDENTIFICATION_REFERENCE,
             label  :    'Product',
             position  : 10 }
         ]
         // DDL source code for custom entity for BAPI_EPM_PRODUCT_HEADER
         // generated on: 20190214 at:142338
      @UI           : {
      lineItem      : [{position: 10, importance: #HIGH}],
      identification: [{position: 10}],
      selectionField: [{position: 10}]
      }.........................}

This is my root Custom CDS Entity and I have exposed it as service , Odata and used the same in the Business Application Studio. How can I have a value help for the selection fields ?

Note: Object Model Annotations does not work. It does not even show up the APP if the object model annotations are present.

View Entire Topic
0 Kudos

Hello,

i was able to achieve value help in custom entity by standard "@Consumption.valueHelpDefinition" annotation.

It will appears in selection fields and also when creating new or editing existing object with this field.

@Consumption.valueHelpDefinition: [{ entity.name: 'I_RERentalObjectVH', entity.element: 'RERentalObject' }]
@Consumption.valueHelpDefinition: [{additionalBinding: [{ element: 'CompanyCode', localElement: 'bukrs' },
{ element: 'REBusinessEntity', localElement: 'swenr' }]}] smenr;