SAP Knowledge Base Article - Public

3677128 - Value help functionality not working for custom field based on custom entity - SAP S/4HANA Cloud Public Edition

Symptom

  • The value help functionality is not working for a custom field based on custom entity.
  • Error message displayed: "There are no columns selected for your table. Before you perform the search, please make sure that at least one column is made visible."

Environment

SAP S/4HANA Cloud Public Edition

Reproducing the Issue

  1. Create a custom entity
  2. Use annotation @OData.property.name to rename the properties of the custom entity.
  3. Create a custom field based on the custom entity 
  4. Access the application where the custom field is available / Adapt the UI to make the custom field available.
  5. Open the value help of the custom field.
  6. Observe the error message: "There are no columns selected for your table. Before you perform the search, please make sure that at least one column is made visible."

Cause

There is a mismatch between the annotations property names and the entity property names.

    

Custom entity:
@EndUserText.label: 'custom entity'
@ObjectModel.dataCategory: #VALUE_HELP
@ObjectModel.query.implementedBy: 'ABAP:ZCL_CE_CUSTOMFIELD'
 
@VDM.viewType: #BASIC
@ObjectModel.usageType.serviceQuality: #B
@ObjectModel.usageType.sizeCategory: #S
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.supportedCapabilities: [#VALUE_HELP_PROVIDER]
@Search.searchable: true
define custom entity zabbcustomentity
{
   @Search: {
          defaultSearchElement: true,
          fuzzinessThreshold: 0.8,
          ranking: #HIGH
         }  
  @ObjectModel.text.element: [ 'Field1Desc' ]
  @UI.textArrangement: #TEXT_ONLY
  @OData.property.name: 'FIELD1'
  key Field1     : zde_fiedl1;
  @Semantics.text: true
  @Search.defaultSearchElement: true
  @UI.textArrangement: #TEXT_ONLY
  @OData.property.name: 'FIELD1DESCRIPTION'
   Field1Desc : zde_field1_desc;
}

    

Checking the metadata and the annotations for the custom field:

<EntityType Name="zcustomentityType" sap:label="custom entity" sap:value-list="true" sap:content-version="1">
<Key>
<PropertyRef Name="FIELD1"/>
</Key>
<Property Name="FIELD1" Type="Edm.String" Nullable="false" MaxLength="10" sap:display-format="UpperCase" sap:text="Field1Desc" sap:label="zde_field1" sap:heading=""/>
<Property Name="FIELD1DESCRIPTION" Type="Edm.String" MaxLength="40" sap:label="zde_field1_desc" sap:heading=""/>
</EntityType>

<Annotation Term="Common.ValueList">
<Record>
<PropertyValue Property="Label" String="custom entity"/>
<PropertyValue Property="CollectionPath" String="zcustomentity"/>
<PropertyValue Property="SearchSupported" Bool="true"/>
<PropertyValue Property="Parameters">
<Collection>
<Record Type="Common.ValueListParameterInOut">
<PropertyValue Property="LocalDataProperty" PropertyPath="YY1_TESTCE_ABC"/>
<PropertyValue Property="ValueListProperty" String="Field1"/>
</Record>
<Record Type="Common.ValueListParameterDisplayOnly">
<PropertyValue Property="ValueListProperty" String="Field1Desc"/>
</Record>
</Collection>
</PropertyValue>
</Record>
</Annotation>
</Annotations>

Resolution

The annotation @OData.property.name cannot be used in a custom entity if it is consumed by a custom field.

The generated metadata extensions are not based on this annotation value, but they are based on the defined property names in the custom entity.

See Also

3612451 - Custom Fields - Frequently Asked Questions - SAP S/4HANA Cloud Public Edition - SAP for Me

Keywords

value help, custom field, display line items, general ledger app, sap s/4hana cloud public edition, error message, no columns selected, metadata, annotations, custom entity, troubleshooting, extensibility tools, key user extensibility tools , KBA , BC-SRV-APS-EXT-FLD , Custom Fields , Problem

Product

SAP S/4HANA Cloud Public Edition all versions