SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
โคข Open full site

Use OData Metadata to dynamically create the columns

Use OData Metadata to dynamically create the columns

Overview

🎓 intermediate 15 min. SAP HANAIntermediateHTML5OdataSapui5Express Edition
Thomas Jung T Thomas Jung November 1, 2022
Created by September 6, 2016
Contributors

Prerequisites

Prerequisites

  • This tutorial is designed for SAP HANA on premise and SAP HANA, express edition. It is not designed for SAP HANA Cloud.
  • Proficiency: Intermediate
  • Tutorials: Consume a Basic OData Service

Steps

Next Steps

Time to Complete

10 Min.


Step 1 Check the metadata from the service
โ€”

In the previous tutorial, you hard-coded the columns to be displayed from your OData service. However, OData services expose all their meta data and we can use this feature to build the columns dynamically. You can test this by running the web module and calling the OData service and adding $metadata

view file
view file

You can see the service exposes the names of the fields and other properties such as the length.

Step 2 Adapt the controller
+
Step 3 Save and run
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 3
1. Check the metadata from the service 2. Adapt the controller 3. Save and run

Learn more →