Liquid UI - Documentation - 17.01 Add a comment on the screen

17.01 Add a comment on the screen


Prerequisites


Purpose

Comment command is used for different purposes, primarily to summarize the code and explain the script’s purpose. In this article, you will learn about the usage of the comment(), where it can be used as a quick info text or to display the purpose of the SAP screen or fields.


User Interface


//Create this file SAPLIQS0.E0100.sjs inside your script folder for customizing the Create PM Notification: Initial Screen

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

  1. Using the title(), change the title of Create PM notification: Initial Screen to Create PM Notification - Liquid UI, as shown in the image below.
     
    //Change the title to "Create PM Notification - Liquid UI"
    title("Create PM Notification - Liquid UI");
    
     
     
  2. Using the del(), delete the Notification input field and Reference group box.
     
    //Deletes Notification and Reference.
    del("F[Notification]");
    del("G[Reference]");
    
     
     
  3. Using the text(), change Notification type input field to Select Notification type and add a text box titled Enter Notification Information, as shown below.
     
    //Changes screen element name and adds a text box.
    text("F[Notification type]","Select Notification type",{"text":true});
    text([7,25],"Enter Notification Information",{"size":30});
    textbox([8,15],[14,66],{"name":"z_iw21_textbox","textfont":"Arial","left":true,"textheight":"15","textweight":"5"});
     
     
  4. Add a pushbutton labeled "Notify" to execute the process iw21_copytext when clicked.
     
    //Creates a pushbutton with the label Notify.
    pushbutton([16,35],"Notify",{"process":iwNotify21_copytext});
     
     
  5. Add a comment to notify the user about the notification.
     
    //Adds a comment about the notification.
    comment([20,12],"The notification information appears on the Create PM screen",{"size":30});
     

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