Passing values on the same screen

In the following example, we will use a set of radiobuttons to pass values to the Order Type field on the VA01 initial screen. To do this, we will also need to employ the set command. Each radiobutton will have a value and that value will be placed into the 'Order Type' field. We will also make the Standard Order as the default selection. Once you select a radiobutton and press enter, the associated value will be placed in the Order Type field.

pushbutton([rows, cols], "@iconID\\QTooltip text@Label", "/ntcode", {"option":value…});
  1. Go to the VA01 screen in SAP.
  2. Open the script file (SAPMV45A.E0101.sjs) and enter the following code. Create the file if it does not already exist.
    				radiobutton([12,0],"Standard Order", {"[Order Type]":"OR"});
    radiobutton([13,0],"Returns", {"[Order Type]":"RE"});
    radiobutton([14,0],"Promotions", {"[Order Type]":"AA"});
    radiobutton([15,0], "Rush Order", {"[Order Type]":"RO"});
    				
  3. Save your changes and refresh the SAP screen.

    The screen will display as shown below:



Once you select a radiobutton and press Enter, the value associated with the radiobutton you selected will be passed to the screen you are on. In this example, we specified the order type, resulting in the screen below displaying: