leadingspace

The leadingspace option for inputfields defines the maximum input for an inputfield.

The leadingspace option retains any spaces that may exist before characters entered in an inputfield. The syntax is as follows:

{"leadingspace":true}

Examples

To demonstrate the leadingspace option, please do the following:

  1. 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});
  2. Save the changes and refresh the SAP screen.

  3. Enter the text abcdef into the new inputfield.
  4. The screen now appears as follows. Note that the spaces before the intiial character have not been retained.



  5. Re-open the script file and add the 'leadingspace' option by changing the code as follows:

    inputfield([4,5], "Inputfield Test", [4,20], {"name":"inpfld_1", "leadingspace":true});
  6. The screen now appears as in the below example, with the spaces retained in the field entry.