Calculate a Value Using Local and Global Script Variables: SAP BusinessObjects Design Studio 1.1

Calculate a Value Using Local and Global Script Variables: SAP BusinessObjects Design Studio 1.1


Variables enable you to encompass complex statements into objects that you can refer to in other scripts and components. Note that if you want a variable to be available to components other than the one in which it is defined, you must create it as a global variable at the application level. To calculate a delivery quote percentage for the application, start by creating a global variable to store the resulting value. Define a unique name for the variable. Use a naming convention that allows you to easily identify your variables. Note that in this tutorial, typed values will be entered for you. Note that by default, the variable is not a URL parameter. URL parameters are variables that can be passed to other applications. Next, set up the dropdown list to calculate the value for the delivery quote variable when the user makes a selection from the list. Create a new local variable to retrieve delivery quantity information from the data source. Local variables must be designated with the prefix “var.” Note that you can activate content assistance by pressing Ctrl + Space. Construct a statement to define the variable as the value for the delivery quantity measure for the sold-to party from the list. Using content assistance, select the measure you want to retrieve. Next, restrict the selection to the sold-to party the user selects from the dropdown list. Complete the statement. The process is repeated to create a variable and retrieve the value for the open orders for the same sold-to party. Next, using content assistance, construct a statement to calculate the delivery quote global variable based on the two local variables you just created. Subtract the value for open orders from the value for delivery quantity. Divide that value by the delivery quantity. Multiply the final value by 100 to turn it into a percentage, and then complete the statement. Finally, display the value for the delivery quote global variable in a text component on the application. Convert the value from the calculation to a string so it can be displayed in the text component. Present the value as a percentage and then complete the script. Save your changes and execute the application locally to test the script. Note that the panel on the right is currently blank. Select a value from the popup, which is configured to apply the same selection in the dropdown list. The delivery quote percentage is displayed in the panel on the right side. You have successfully calculated a value using local and global variables. This is the end of the tutorial.


One thought on “Calculate a Value Using Local and Global Script Variables: SAP BusinessObjects Design Studio 1.1

Leave a Reply

Your email address will not be published. Required fields are marked *