Programming

What Is SAP Build Apps?

SAP Build Apps, formerly known as SAP AppGyver, is a service within the SAP Build product.

 

SAP has consolidated all of its low-code/no-code offerings under a single brand, aiming to streamline and unify the developer experience across its various development tools and platforms. SAP Build Apps enables users of all backgrounds to develop full-stack applications visually, eliminating the need for writing code. It offers drag-and-drop functionality that conceals the complexity typically associated with development, making the process accessible to a broader range of user.

 

In this blog post, we’ll touch on an overview on how to construct business logic in SAP Build Apps, focusing on the following two topics: application logic and functions.

 

Application Logic with the App Editor

Before we delve into the components of application logic in SAP Build Apps, it’s essential to understand two key concepts in application logic: the app state, which includes two different states, and the logic flows.

  • App state – variable state: Consider this as the data stored in the device’s memory, analogous to the runtime variables in any programming language. The data can come from various sources such as user input, information fetched from APIs, device information, and more.
  • App state – component state: The current state or condition of the view components, for example, the color or visibility of the UI element. The component state is connected with the variable state through the binding of a component property to a variable.
  • Logic flows: These consist of a triggering event and attached flow functions, each represented as a node on the logic canvas. The execution sequences of the logic flow are determined by connecting wires between these nodes, as shown below. 

Logic Flow within the Logic Canvas

 

Now that we understand the concept of app state and logic flow, we can start constructing the application logic in SAP Build Apps. To open up the application logic canvas, click on Add logic (circled in the box), located at the bottom half of the application builder view, as shown in this figure.

 

Open Application Logic Canvas

 

Application logic in SAP Build Apps comprises the following components, as shown in the next figure.

  • Events (1): Events are classified into different categories, including component events, app or page lifecycle events, variable events, other events, and custom events, all of which can be triggered by either the user or the application to execute flow functions. A simple example is shown below; when a user clicks on a button, it triggers a component tab event received by the application to perform the next course of action.
  • Flow functions (2): Flow function can be accessed through the flow function library panel, which is divided into three tabs: CORE, BY ME, and INSTALLED, as shown on the left-hand panel. These functions can be easily added to the application via a simple drag-and-drop process.
  • Trigger events (3): Events can be invoked at anywhere within the application. However, if the same events are created multiple times within the application, it should be created on the global canvas for reusability. This allows accessibility from any points within the application and eliminates the need for repetitive event creation in multiple places. With the Trigger event flow function, developers can now call the event created at the global canvas. Detailed steps on how to create events at the global canvas for reusability can be found at http://s-prs.co/v591924.
  • Custom JavaScript (4): Complex and advanced data operations can be achieved using the JavaScript flow function.
  • Pull to refresh (5): Pull to refresh is an event source for the Receive event flow function on the UI page, allowing developers to incorporate custom responses to the application.

Application Logic Components

 

The Upload files flow function can be located in the service marketplace. Once installed, it will be available in the flow function library panel under the Installed tab, ready to be used.

 

Functions with the Backend Editor

Functions are a part of the core feature of visual cloud functions, facilitating the execution of logic flows in a visual manner. To create the function, you have to create an SAP Build Apps project from SAP Build lobby and choose the application backend type application. Next, navigate to the Functions tab at the top toolbar, and create the function via the CREATE NEW button at the top-right corner, as shown in this figure.

 

Create Function

 

Once a function is created, its logic flow can be constructed and configured visually within the logic canvas, as depicted in the final figure. Each function begins with a start execution node on left and concludes with one or more nodes on the right. Additional nodes can be inserted in between to incorporate the function logic. To use the function, it must be enabled as a data source and be consumed within the logic canvas using a Run cloud function flow function.

 

Visual Cloud Function: Function

 

Learn how to install SAP Build Apps in this post.

 

Editor’s note: This post has been adapted from a section of the book SAP Business Technology Platform by Smitha Banda, Shibaji Chandra, and Chun Aun Gooi.

Recommendation

SAP Build
SAP Build

The new SAP Build is here—dive into its tools for low-code and no-code development! Looking for a new development environment to create full stack applications? Learn how to implement SAP Build Apps! Need better tools to design and build a central access point—like SAP Fiori launchpad—for business applications? Get SAP Build Work Zone up and running! Want to create, maintain, and automate business processes? Look no further than SAP Build Process Automation! With practical guidance on the whole SAP Build suite, you’ll be developing in no time.

Learn More
SAP PRESS
by SAP PRESS

SAP PRESS is the world's leading SAP publisher, with books on ABAP, SAP S/4HANA, SAP CX, intelligent technologies, SAP Business Technology Platform, and more!

Comments