The maxlength option for inputfields defines the maximum input for an inputfield.
The maxlength option defines how many characters can be entered in an inputfield. The command is also useful when you want to make an inputfield scrollable. The syntax is as follows:
{"maxlength":value}
You can enter as many characters as are defined in the mazxlength option.
To demonstrate the maxlength 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":26});
Save the changes and refresh the SAP screen.
The screen now appears as follows:
To demonstrate the maxlength option, re-open the script file and define the maxlength as 20 by changing the code as follows:
inputfield([4,5], "Inputfield Test", [4,20], {"name":"inpfld_1", "maxlength":20});
The screen now appears as in the below example: