Liquid UI - Documentation - 11.02 Display different types of messages

11.02 Display different types of messages


Prerequisites


Purpose

Learn how to display messages on the SAP screens using the message command. The messages can be either user-defined custom or system captured based on the purpose i.e., educational, troubleshooting, information, etc.


User Interface

 //Create this file inside your script folder for customizing the SAP Easy Access screen: SAPLSMTR_NAVIGATION.E0100.sjs

//Now, let's start adding the Liquid UI script to the above file and save it.

  1. Logon to SAP and delete the image container using the del command on the SAP Easy Access screen, as shown below.
     
    // Deletes an image container on the easy access screen
    del("X[IMAGE_CONTAINER]");
     

     
  2. Now, add the following Liquid UI script to this file and save it. Here, we are using the message command to display a welcome message with three different symbols.
     
    // prototype for the string to trim blank spaces
    String.prototype.trim = function() {
        return this.replace(/^\s+|\s+$/g,"");
    }

    // display a message welcoming the user with a success symbol
    message("S:Welcome "+_user.trim()+"!");
    // display a message welcoming the user with an error symbol
    message("E:Welcome "+_user.trim()+"!");
    // display a message welcoming the user with a warning symbol
    message("W:Welcome "+_user.trim()+"!");
     


SAP Process

  1. Now, logon to SAP. On the appeared SAP Easy Access screen, a message will be displayed for welcoming the user at the status bar, depending on the logon keyword used. It can be a Success, Error, or a Warning symbol, displayed before the message, as shown below.
     
     

     

Can't find the answers you're looking for?