Application Development and Automation Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
Dan_Wroblewski
Developer Advocate
Developer Advocate
465

SAP Build Apps now has the ability to create page variables based on existing schemas, like from other variables, data entities, and most interestingly, processes. This is really helpful.

Dan_Wroblewski_0-1745386674892.png

I especially like that for every process type of schema, you can get both the input and output schemas -- more on this below.

HISTORICAL CONTEXT: I'm sure this feature was an idea for a while, but I first heard about when the new Processes flow functions were released a year ago. It was great that you could now trigger processes from SAP Build Apps without all the manual calling of an API, but you still had to create the variables for the inputs and outputs -- if you made one data type mistake the process would fail. So the answer was for the schemas to be easily inherited from the process, and now that is possible.

The Basics

When creating a new page variable, you can still define it from scratch, but now you can simply copy the schema from somewhere else:

Dan_Wroblewski_1-1745386778986.png

Important to note that these definitions copy the schema onto the new variable. You can then modify the variable definition -- there is "linking".

  • Variables: There are many times I need multiple copies of the same data -- I want to modify the data but keep the original in a different variable.
  • Actions and Process: With SAP Build Apps now able to easily call actions and processes, it is helpful to not have to create your own variables to hold the returned data, something you had to do up until now.
  • Entities: This you could do with Data Variables, but there were times when you wanted to modify that data without disturbing the original data.

Use with Processes

I got to understand the feature because I recently updated tutorials for integrating SAP Build Apps with SAP Build Process Automation, and the ability to quickly create variables made the tutorial easier to understand and quicker to perform.

https://developers.sap.com/mission.build-workshop-sales-order.html

Dan_Wroblewski_2-1745387227787.png

Triggering a Process

When triggering a process, all I had to do was create a page variable from the process schema, indicating:

  1. Base it on a process
  2. Use my process
  3. Use the schemas involved with the APIs for triggering a process
  4. Use the inputs of the process

Dan_Wroblewski_3-1745387896105.png

One of the pains before was that essentially in SAP Build Apps, when defining the REST APIs for calling SAP Build Process Automations, you could only have one schema definition, either the input or the output. Now, I can create page variables for the inputs and for the outputs.

Here, I set up the page variable for the inputs of our process inputs, which is quite complicated.

Dan_Wroblewski_4-1745388104113.png

To trigger the process, all I had to do was bind the page variable to the fields. Then, when I click the button to trigger, I drag a Trigger Process flow function, and set the Input Parameters to the context property of the page variable. No more setting object properties and each field separately.

Dan_Wroblewski_5-1745388203880.png

I can still change the binding type to Object Properties and set the fields manually, or I can use a Formula to make modifications to the page variable. 

Retrieving Instances

Getting info about the process instances was even simpler, and the ability to create both input and output schemas helped.

This time I created a variable based on the Retrieve Process Instances schemas, and used the output schema.

Dan_Wroblewski_7-1745388550349.png

This provided the standard fields that are part of every such API call.

Dan_Wroblewski_6-1745388517424.png

Now all I had to do was bind the page variable to the UI. And in the logic, I just put the output of the Retrieve Process Instances flow function into the variable. Really easy.

Dan_Wroblewski_8-1745388769572.png

It took really no time to be able to view the list of process instances.

Dan_Wroblewski_9-1745389227600.png

Tutorials

Again, you can see the whole SAP Build Apps integration with SAP Build Process Automation in the revised sales order tutorials, which are now even faster to do, less than an hour to do both the process and the app. 

https://developers.sap.com/mission.build-workshop-sales-order.html

Dan_Wroblewski_2-1745387227787.png

 

 

 

 

 

Labels in this area