Prerequisites
- Products: Liquid UI WS, Liquid UI Server or Local DLL, Client Software
- Commands: onscreen(), inputfield(), set()
Purpose
Learn how to assign the value of an inputfield to the input field of another SAP screen using variables. We will walk you through the following steps.
- Add a pushbutton on an SAP screen
- Add a function to assign a value to an inputfield of another screen
//Create this file inside your script folder for customizing Change Sales Order screen SAPMV45A.E0101.sjs
//Now let's start adding the content to the above file
- Navigate through the Create Sales Order screen. Add a toolbar pushbutton as shown below:
// Creates a pushbutton on toolbar that runs a z_process function pushbutton([TOOLBAR],"Set",{"process":z_process});
- Add a function (z_process) to set Order Type value into a variable and then assign the variable value to the inputfield of another screen.
// Add a function to assign values to an inputfield on the another screen function z_process() { set("V[z_order]", "&F[Order Type]"); onscreen 'SAPMV45A.4001' inputfield([1,40], "Order", [1,56], {"size":10}); set("F[Order]", "&V[z_order]"); }
- Enter Order Type and click Set toolbar pushbutton on the screen.
- You will see the Order inputfield created in the Create Sales Order overview screen and the order type entered in the initial screen is assigned to the Order inputfield in the overview screen as shown below.
Next Steps
Assign values to multiple variables using z_
Learn how to load and clear values into the fields using variables
Learn how to load and clear values into the fields using variables
10 min.
This article is part of the Liquid UI Variables tutorial.