The required option for inputfields makes entry non-optional.
The required option makes a entry into a field required in order to proceed to the ensuing screen or step in a process. The syntax is as follows:
{"required":true}
To demonstrate the required option, please do the following:
Open the Easy Access script file (SAPLSMTR_NAVIGATION.E0100.sjs) and enter the following code. Create the script file if it does not already exist.
inputfield([4,5], "Inputfield Test", [4,20], {"name":"inpfld_1", "size":20, "required":true});
Save the changes and refresh the SAP screen.
The screen now appears as follows:
To demonstrate the required option, re-open the script file and changethe code as shown below:
inputfield([4,5], "Inputfield Test", [4,20], {"name":"inpfld_1", "size":20, "required":true});