Liquid UI - WS Reference Library

Restricting User Input with Radiobutton


Prerequisites


Runs On

  SAP GUI Android iOS WM Web
Direct Connect          
Liquid UI Server Connect

 

Purpose

Many times, when developing a more efficient design for an SAP screen, we want to restrict the user input to only a few options. In this example, we show the restriction of the Industry Sector and Material Type inputfields for the transaction MM01.

 

User Interface

Log in to SAP and navigate to MM01. In native SAP, Industry Sector and Material Type have dropdown menus with a variety of options.


 

This new design has removed the Industry Sector and Material Type’s dropdown menus and replaced them with radiobuttons.



Liquid UI Script

//SAPLMGMM.E0060.sjs

// delete the native SAP input fields
del("F[Industry sector]");
del("F[Material Type]");
// Create radiobuttons for the Industry sector to restrict user input
box([1,41],[5,74],"Industry Sector");
// In the radio button's options, we specify what input field this pertains to
radiobutton([2,45],"Beverage",{"[Industry sector]":"B"});
radiobutton([3,45],"Mechanical Engineering",{"[Industry sector]":"M"});
radiobutton([4,45],"Pharmaceuticals",{"[Industry sector]":"P"});
// Create radiobuttons for the Material Type to restrict user input
box([6,41],[9,74],"Material Type");
// In the radiobutton's options, we specify what input field this pertains to
radiobutton([7,45],"Finished product",{"[Material Type]":"FERT"});
radiobutton([8,45],"Value-only materials",{"[Material Type]":"WERT"});