Skip to content

Example of sap.ui.mdc.Table with OData V4 and annotation.xml #4354

@frazam

Description

@frazam

What is the issue and how can we reproduce it?

Hello,

I'm new to OPENUI5 and would like to understand how to use sap.ui.mdc.Table with an OData V4 service.

In particular, I’ve created a SAPUI5 freestyle application and I’m trying to define the table columns using an annotation.xml file.
Here’s an example from SAP Fiori Development Portal:

<Annotations Target="TravelService.Travel">
	<Annotation Term="UI.LineItem">
		<Collection>
			<Record Type="UI.DataField">
				<PropertyValue Property="Value" Path="TravelID" />
			</Record>
			<Record Type="UI.DataField">
				<PropertyValue Property="Value" Path="BeginDate" />
			</Record>
			<Record Type="UI.DataField">
				<PropertyValue Property="Value" Path="EndDate" />
			</Record>
			<Record Type="UI.DataField">
				<PropertyValue Property="Value" Path="to_Agency_AgencyID" />
			</Record>
			<Record Type="UI.DataField">
				<PropertyValue Property="Value" Path="BookingFee" />
			</Record>
			<Record Type="UI.DataField">
				<PropertyValue Property="Value" Path="TotalPrice" />
			</Record>
			<Record Type="UI.DataField">
				<PropertyValue Property="Value" Path="CurrencyCode_code" />
			</Record>
			<Record Type="UI.DataField">
				<PropertyValue Property="Value" Path="Description" />
			</Record>
		</Collection>
	</Annotation>
</Annotations>

However, it seems that this feature (defining columns via annotations for sap.ui.mdc.Table in a freestyle app) might not yet be fully supported.

Could you please confirm if this is possible, and if so, provide an example or some guidance on how to set it up correctly?

Thank you very much for your help.

Best regards,
Francesco

Which OpenUI5 version is your project targeting?

1.142

Is the issue device- or browser-specific?

No response

Confirmation

  • I have searched the existing issues and reviewed the relevant documentation as well as the API reference.
  • I am not disclosing any internal or sensitive information.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions