
In SAP Build Apps, transformation formulas play a vital role in dynamically manipulating data within applications. Like Excel formulas, these predefined functions and expressions allow you to build logic seamlessly without the need for custom coding. By leveraging transformation formulas, you can efficiently transform data for UI bindings, API responses, and other app logic requirements.
Formulas serve as one of the primary component binding types in SAP Build Apps. This means they can be applied in almost any part of the application to bind and manipulate data dynamically. For instance, when binding a "Text" or "Dropdown" component value, you can simply select the binding icon in the Properties tab and choose "Formula" as the binding type. This flexibility extends to tasks such as validating data fetched from an API, validating the data, Changing the Formats of display data, String and Arithmetic functions, etc., Using formulas, you can access all existing variables in the application that can then be modified.
We developed a prototype for creating a Business Partner using SAP Build Apps integrated with SAP Build Process Automation. Here, SAP On-Prem systems are connected to read data from the Business Partner API and display it as Value Helps for dropdown values
Here’s an overview of common transformation formulas that we used in SAP Build Apps for reading the data from backend and displaying as value helps:
SAP Build Apps provides an extensive range of built-in functions to simplify transformations, covering categories like:
In addition to built-in formulas, you can design custom transformation formulas to handle specific functionalities within your app. Here are a few common use cases:To map an input field of Dropdown type, we can map the data that needs to read from a datasource
MAP(data.ZCDV_BusinessPartnerRole1, {label:item.BPRoleText,value:item.BusinessPartnerRole})
UNIQUE_BY_KEY(MAP(data.ZCDV_BupaCountry1,{label:item.CountryText, value:item.Country}), "value")
MAP(SELECT(data.ZCDV_BupaCountry1, item.Country == pageVars.bp_inputs.country), {label: item.RegionText, value: item.RegionName})
IS_EMPTY(pageVars.bp_inputs.country)
UPPERCASE(data.A_BusinessPartner1[0].Initials)
Note: In SAP Build Apps, custom logic or formulas cannot be directly written for all data sources. Only APIs that are exposed can be utilized for any kind of data transformation or manipulation.
I hope this blog post provides you with a understanding of formulas in SAP Build Apps and how they can be leveraged to enhance data manipulation within your applications.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
5 | |
4 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
2 |