diff --git a/packages/ui5-cc-spreadsheetimporter/src/controller/odata/MetadataHandlerV4.ts b/packages/ui5-cc-spreadsheetimporter/src/controller/odata/MetadataHandlerV4.ts index f986a4f7b..fb8d52fb5 100644 --- a/packages/ui5-cc-spreadsheetimporter/src/controller/odata/MetadataHandlerV4.ts +++ b/packages/ui5-cc-spreadsheetimporter/src/controller/odata/MetadataHandlerV4.ts @@ -81,6 +81,17 @@ export default class MetadataHandlerV4 extends MetadataHandler { propertyObject.maxLength = propertyValue.$MaxLength; listObject.set(propertyName, propertyObject); } + // if no annotation is found, still try to add the property + if(!propertyLabel && !propertyName.startsWith("SAP__")){ + let propertyObject: Property = {} as Property; + propertyObject.label = this.getLabel(annotations, properties, propertyName, propertyLabel, odataType); + if (!propertyObject.label) { + propertyObject.label = propertyName; + } + propertyObject.type = propertyValue.$Type; + propertyObject.maxLength = propertyValue.$MaxLength; + listObject.set(propertyName, propertyObject); + } } } else { const propertiesFiltered = []; @@ -102,6 +113,17 @@ export default class MetadataHandlerV4 extends MetadataHandler { propertyObject.maxLength = propertyValue.$MaxLength; listObject.set(propertyName, propertyObject); } + // if no annotation is found, still try to add the property + if(!propertyLabel && !propertyName.startsWith("SAP__")){ + let propertyObject: Property = {} as Property; + propertyObject.label = this.getLabel(annotations, properties, propertyName, propertyLabel, odataType); + if (!propertyObject.label) { + propertyObject.label = propertyName; + } + propertyObject.type = propertyValue.$Type; + propertyObject.maxLength = propertyValue.$MaxLength; + listObject.set(propertyName, propertyObject); + } } }