Skip to Content
Technical Articles
Author's profile photo Naoto Sakai

SAP Build Process Automation’s Little Technique – Variable Definitions

Here is a little technique for SAP Build Process Automation.

How to define variables?

In general, SAP Build Process Automation allows a process to flow by using the values entered in a form in subsequent steps.
And this is how you can refer to the values of different components (components that exist before the component) with a click selection.

It is convenient to be able to select the value you want to display or use with a click.
However, this convenience can sometimes turn into difficulty.
For example, you want to set the value “Hello” to the read-only text field named “Comment” on this approval form.

In fact, it seems that this field does not allow manual entry of values, but only allows setting of values from other components.
I wish there was a Set Variables component like in Build Apps, but there is not in Build Process Automation. I don’t want to place a meaningless “Hello” field in the form before this one in the flow, so I need to do something about it.
What should we do? Here are two ways to do it.

1.Use Automation

Once you have defined the values you want to set for Automation’s output, you can use those values from subsequent components.

You can define only the outputs with empty contents like this.

If you have already set up a Desktop Agent in Unattended mode, you can use this method.

Personally, I think it is better to set up at least one Desktop Agent in Unattended mode, as it can be used in a variety of situations and can be more like a programming logic compared to a workflow in Automation. For example, type conversion and string substitution are also possible within Automation, so please consider installing a Desktop Agent not for RPA, but for this kind of generic processing and processing within a workflow.

2.Use Decision

Decision is used to determine the next approver in samples and so on. If you think about it, this function outputs the ID of the next approver and so on as variables. In other words, it can be used as a variable definition.

For example, you can assign Process Started By (ID of the person who executed this flow) as an input and then use …

The rule compares two user id’s as input and sets the value to be assigned as output.
By setting a conditional expression that must always be True, and then setting an arbitrary value as the output value, the value is defined.
Although Decision is primarily used to determine the next approver in a business rule-like manner, it can also be used in this way.
Items that can only be assigned variables can also be set to arbitrary values as shown above.
I hope you will use this feature effectively during flow development.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Warren Eiserman
      Warren Eiserman

      Thanks for the blog and solutions, just a warning for developers using the "unattended mode" with PAYG account, you will be charged 650 Euros if you have not created a connection before.


      Cost Estimate from Discovery Center

      Author's profile photo Daniel Wroblewski
      Daniel Wroblewski

      I use the Decision all the time to create a variable, though I must admit it is a real big workaround. I believe actual variables are on the roadmap.

      Nice blog!

      Author's profile photo Ashish Singh
      Ashish Singh

      Thanks for the suggestion! Actual variables are really needed from simple to complex workflows. Hope they are supported really soon!