Liquid UI - WS Reference Library

title-using variables with title


You can use a variable instead of a string to as the new title of a screen. In the following example, we will use the value contained in a system variable as the new screen title.

  1. Go to the Easy Access screen. The default screen appears as shown below:

  2. open the 'SAPLSMTR_NAVIGATION.E0100.sjs' script file, and enter the following code. Create the file if it does not already exist.
    var z_screentitle = [_transaction];
    title("SAP " +z_screentitle);
            
  3. Save the changes and refresh the SAP screen. It will now display as shown below:
  4. You can also use the variable directly without any string included. Change the code to the following:
    var z_screentitle = [_transaction];
    title(z_screentitle);
              
  5. THe screen will display as shown below: