The numerical option for inputfields restricts input to numbers.
The numerical option restricts the input type to numbers. The syntax is as follows:
{"numerical":true}
To demonstrate the numerical 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});
Save the changes and refresh the SAP screen.
The screen now appears as follows:
To demonstrate the numerical option, re-open the script file and add the numerical option as shown below:
inputfield([4,5], "Inputfield Test", [4,20], {"name":"inpfld_1","size":20, "numerical":true});
Save the script file and refresh SAP.
Try to enter some alphabetical characters into the field. Verify that you cannot enter any alphabetic characters.
Enter some numbers. These entries should display as in the example below.