You can use the set command to assign a value from a variable. In this case, we will assign a value to a variable and use set to assign it to the 'Sold-to party' and 'Ship-to party' fields on the VA01 Overview screen.
-
Go to the VA01 initial screen.
-
Open the VA01 script file (SAPMV45A.E0101.sjs) and enter the following code. Create the file if it does not already exist.
inputfield([12,0], "Customer", [12,11], {"name":"z_cust", "size":10});
onscreen 'SAPMV45A.4001'
set("F[Sold-to party]", "&V[z_cust]");
set("F[Ship-to party]", "&V[z_cust]");
The VA01 screen will display as follows:
-
Enter the value '1460' into the new inputfield, enter 'OR' into the 'Order Type' field and press Enter.
The VA01 Overview screen will appear as follows: