Introduction
In Design Production Processes app, you can create Global Variables that are visible “globally” to read and write data across instances of one specific production process, or across multiple same-runtime production processes in the same design. Global Variables are persistent, and can be used across several Production Processes, including Automation Sequences.
In this blog, I will show you how to use Global Variables using a simple example for educational purposes.
To get started, create a new or open an existing Production Process. Click the central header arrow to 'Expand Header' and notice the 'Global Variable' section.
Click the global variable number to open 'Manage Global Variables' popup.
Where you can create global variables that are of different visibility scopes:
In both cases, the global variable name should be unique in the scope of the production process design.
You can create global variables for purposes like:
Before you can create a process-wide global variable, at least one production process must be created. To create a new global variable, make sure the relevant Production Process is selected if you are creating a process-wide variable, or open the design-wise tab to create design-wise variables, and click 'Edit' to enable the editor mode.
Click 'Create', and enter the new Global Variable details including Name, Description, Data Type, Schema if needed and select the relevant Visibility Scope, click 'Save' and 'Close'.
To write a global variable value, you can use 'Write Global Variables' service, click 'Add' on 'INPUT' tab, and select the relevant global variable to write.
Inform a value or link a parameter or variable to be written as your global variable value.
To read a global variable value, you can use 'Read Global Variables' service, click 'Add' on 'OUTPUT' tab, and select the relevant global variable to read.
Then, you can directly assign the read output value to another parameter or variable, or link it from another service.
Again, keep in mind that Process-wide variables are visible to any instance of the selected production process, and Design-wide: variables are visible to all instances of all processes of the same runtime system in a single production process design.
So far, we created a Process-wide variable for 'startSFC' production process as follows:
Which cannot be seen from a different production process like 'sfcComplete', for example:
To share global variables between process of the same production process design, we will need a Design-wide variable.
Which can be seen by both startSFC and completeSFC, which are part of the same production process design.
Back to Manage Global Variables, you can easily see where Design-wide are currently in use by clicking 'Dependencies' under 'Where-Used' column.
To delete global variables, click 'Edit', 'X' for the respective variable to be deleted, 'Save' and 'Close'.
Check Global Variables for more.
Do you like this post? Please let me know in the comments section what you think. Any feedback is highly appreciated.
Or, if you have any questions, please check SAP Community Q&A Area, or comment down below.
Thanks,
Manoel Costa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
4 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
2 | |
2 | |
2 |