Skip to Content

Create an Application with SAP Build Apps

Create an application with SAP Build Apps on SAP BTP. The application, created in a browser, can be used with the mobile preview app to scan physical barcodes on food packaging to display calorific information.
You will learn
  • How to create a no-code project with SAP Build Apps
  • How to add and edit visual elements in the SAP Build Apps Composer tool
thecodesterDaniel WroblewskiNovember 30, 2024
Created by
thecodester
November 5, 2024
Contributors
thecodester

Prerequisites

  • Access to an SAP Build Apps system – follow these instructions to install SAP Build Apps on your trial system.
    • For video instructions, see the following:
       
    • For written instructions, do ONLY Step 2 of Set Up Prerequisites for SAP Build CodeJam → YOU ONLY HAVE TO DO STEP 2 (Install SAP Build Apps) OF THIS TUTORIAL!!!
  • Download the SAP Build Apps previewer app on a smart phone or tablet: iOS / Android.

IMPORTANT: Make sure to follow the above prerequisites for installing SAP Build Apps – the booster will install SAP Build Apps and the Cloud Identity Service, as well as assign you the needed roles.

In this mission you will learn how to create a no-code application using SAP Build Apps. The application you create enables someone to scan a barcode of a food item and display information about the product using the Open Food Facts API:

Diagram of scanning a food item from a mobile app

IMPORTANT: Though you can use any SAP Build Apps version, these tutorials are based on a SAP BTP trial account.

  • Step 1

    Yes, no one reads the documentation.

    But you need to follow the documentation to set up SAP Build Apps correctly on a trial account. The setup is simple, but it does require a custom identity provider and specific roles, so it’s worth taking an extra 2 minutes to make sure everything is set OK.

    If you set up SAP Build Apps properly, skip this step. Otherwise, we have tried to make it as simple as possible by giving you a choice:

    • 2-minute video
    • Written instructions – the written instructions are in a single step – Step 2 – in our SAP Build CodeJam prerequisites tutorial. You only have to do Step 2, Install SAP Build Apps.

    ADVERTISEMENT: The Developer Advocates deliver SAP Build CodeJams –- both beginner and more-advanced workshops – and we are always looking for hosts. If you are interested, see our blog about what’s required to host a CodeJam and add a comment there that you want to host one.

    SAP Build CodeJam
  • Step 2
    1. Open the SAP Build lobby in your trial account by doing the following:

      • Open the SAP BTP cockpit by going to https://account.hanatrial.ondemand.com/cockpit.

      • Click Go to Your Trial Account.

      • Under Subaccounts, click the trial tile.

        Subaccount
      • Under Instances and Subscriptions, click the button next to SAP Build Apps.

        Instance

        This opens the SAP Build lobby.

        SAP Build lobby
    2. Within the SAP Build lobby, click Create.

      Create

      Click Build an Application.

      Create

      Click SAP Build Apps.

      Create

      Click Web & Mobile Application.

      Create
    3. Enter:

      Field Value
      Name Scanner Application
      Description Scanner app for reading food barcodes

      Click Create.

      Create

      Your SAP Build Apps project is created, and the default Home page is displayed. Once created, projects can be accessed again at any time from the SAP Build lobby.

      New project
    4. Since we want to create a mobile app, open the device dropdown and select Mobile.

      Mobile

      Your project will now look like this:

      Mobile layout
  • Step 3
    Editor

    When working with SAP Build Apps, the majority of your time will be spent in the app builder area. This area allows you to complete key tasks such as, but not limited to, the following:

    • Build pixel-perfect user interfaces

    • Integrate with external data resources

    • Create complex logic with visual programming

    • Bind data to components to create dynamic views

    • Define navigation

    For more detailed coverage of the features available in the app builder area, view the SAP Build Apps documentation.

  • Step 4

    You’ll now start to create a basic layout for your application, starting with editing text.

    1. Select the Title component (the one that says Headline) by clicking it once.

      Select title

      Click the text to select the text.

      Select text

      Copy-and-paste or type in the following:

      Text
      Copy
      Barcode Scanner
      
      Paste text
    2. Double-click the Text component to highlight the text, and paste in the following:

      Text
      Copy
      Scan a barcode of a food product using your smartphone
      
      Text field

      Instead of editing text directly inside a component, you can also set the text using the Content property in the Properties tab to the right. This option is needed if you set the text based on a formula or variable.

  • Step 5

    Next, you’ll need to add a scan button which, when tapped, will open the camera device on your smartphone.

    1. Locate the Button component (found under Core > Essentials) and drag and drop this underneath the paragraph/text field.

      Adding a button
    2. Edit the button label by clicking the word Button inside the button and typing Scan.

      Edit button text
    3. Click Save (upper right).

      Save Project

    The application is now saved and available to preview using the preview app on your smartphone.

    In SAP Build Apps, which type of design element is a Button (i.e., in which group of components is it located)?

  • Step 6
    1. Open the SAP Build Apps preview app on your mobile device, and click Other login options.

      Open preview app

      Select the US10 region from the dropdown list.

      Select US10

      If you are not using a trial account and your account is in the EU10 region, select the EU10 region.

      Click Generate Code. This will display a pin code.

      Pin code
    2. Go back to SAP Build Apps on your desktop, and click Preview.

      Launch
    3. Enter the pin code, and press Enter or click Confirm pin.

      Alt text

      This will refresh the preview app and display a list of your apps.

    4. Click Open for the Scanner Application project.

      My apps

      Your application starts to run.

      Preview of app

    What do you need to preview the app on your phone?

Back to top