Supply Chain Management Blogs by SAP
Expand your SAP SCM knowledge and stay informed about supply chain management technology and solutions with blog posts by SAP. Follow and stay connected.
cancel
Showing results for 
Search instead for 
Did you mean: 
ManoelCosta
Product and Topic Expert
Product and Topic Expert
0 Kudos
461

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.

ManoelCosta_0-1730465180615.png

Click the global variable number to open 'Manage Global Variables' popup.

ManoelCosta_1-1730465323736.png

Where you can create global variables that are of different visibility scopes:

  • Process-wide: Visible in all instances of a single process. 
  • Design-wide: Visible in all instances of all processes of the same runtime system in a single production process design.

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:

  • Define the data to be buffered locally
  • Access and reuse the data in other process instances, processes, or designs

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.

ManoelCosta_2-1730467234532.png

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'.

ManoelCosta_4-1730465852292.png

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.

ManoelCosta_3-1730467506533.png

Inform a value or link a parameter or variable to be written as your global variable value.

ManoelCosta_4-1730467637833.png

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.

ManoelCosta_5-1730467775242.png

Then, you can directly assign the read output value to another parameter or variable, or link it from another service.

ManoelCosta_6-1730467903934.png

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:

ManoelCosta_0-1730468211457.png

Which cannot be seen from a different production process like 'sfcComplete', for example: 

ManoelCosta_1-1730468303202.png

To share global variables between process of the same production process design, we will need a Design-wide variable.

ManoelCosta_3-1730468406366.png

Which can be seen by both startSFC and completeSFC, which are part of the same production process design.

ManoelCosta_4-1730468517987.pngManoelCosta_5-1730468559545.png

Back to Manage Global Variables, you can easily see where Design-wide are currently in use by clicking 'Dependencies' under 'Where-Used' column.

ManoelCosta_1-1730468758911.png

To delete global variables, click 'Edit', 'X' for the respective variable to be deleted, 'Save' and 'Close'.

ManoelCosta_2-1730468828630.png

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