default

The default option for inputfields adds user-specified default text.

The default option enables users to add default text to the inputfield. You can edit or replace this default text. There are two possible syntaxes, which are as follows:

{"default":"string"}
{"default":value}

Examples

To demonstrate the default option with a string, 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":20});
  2. Save the changes and refresh the SAP screen.

  3. The screen now appears as follows:



  4. To demonstrate the default option using a value, re-open the script file and changethe code as shown below:

    inputfield([4,5], "Inputfield Test", [4,20], {"name":"inpfld_1", "size":20, "default":12345});
  5. The screen now appears as follows: