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

Create a Composite Component (List with Rating)

Create a composite component made by mashing up a Large Image List Item with a Star Rating, so users can rate products.

Overview

🎓 beginner 20 min. SAP Build AppsBeginnerSAP Business Technology PlatformSAP Build

You will learn

  • โœ”How to create a composite component
  • โœ”How to add properties to your component
  • โœ”How to bind internal properties to component properties
  • โœ”How to use a container to organize your component
  • โœ”How to install components from the Marketplace, and create duplicates to modify
Daniel Wroblewski D Daniel Wroblewski September 10, 2024
Created by January 25, 2023
Contributors

Prerequisites

Prerequisites

  • You have set up SAP Build App and have entered the lobby, as described in this video:

Steps

Intro

This tutorial series lets you become proficient in SAP Build Apps in about an hour. Among other things, it will teach you:

  • How to build your own composite components
  • How to install components from the Marketplace
  • How to use styling to modify the look and feel and the alignment of components
  • How to connect to a backend through an SAP BTP destination
  • How to connect to a OData backend with a URL
  • How to create backend entities and functions with Visual Cloud Functions
  • How to connect to those entities and functions from your front end
  • How to bind component properties to your data
  • How to create custom events
  • How to reuse logic flows

This tutorial

This tutorial shows you how to mashup up 2 components into your own composite component.

The specific component you will build enables you to display business data as a list – products in this case – and to display a rating in the form of 5 stars. The component will have 2 new properties:

  • Rating, which will tell the component how many stars to highlight and will be displayed as a number with 1 decimal point.

  • RatingCount, which will tell the component how many ratings were received for this item, and will be displayed along the rating.

The component will look like this in design mode.

Component design
Component design

The component will look like this in runtime mode.

Component runtime
Component runtime

Step 1 Create a new app project
โ€”

  1. Go to the SAP Build lobby, and click Create.

    Lobby create
    Lobby create

    Select SAP Build Apps, and then Build an Application.

    Build an application
    Build an application

    Select Web & Mobile Application.

    Create project
    Create project

    For the project name, enter Social Media, then click Create.

    You will get a skeleton project, with a page, a title component, and a text component.

    SAP Build Apps lets you create apps by dragging and dropping components onto the canvas, and then configuring those components by changing, for example, the text in a text component or the image to display in an image component.

  2. Select the text component, and delete it.

    Delete text
    Delete text

  3. Change the text of the title to Products.

    Change title
    Change title

  4. Click on an open area in the canvas, and in the Properties tab, change the name of the page to List of Products.

Your app should look like this:

New project
New project

Step 2 Install needed components
+
Step 3 Mash up the new components
+
Step 4 Add component properties
+

Resources

Discussion

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

Submit detailed feedback Discuss in Community
Steps
Step 1 of 4
1. Create a new app project 2. Install needed components 3. Mash up the new components 4. Add component properties

Learn more →