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

17.01 Add a comment on the screen


Prerequisites

Purpose

This article explains how to use comment() to quickly display informational text or describe the purpose of SAP screens on fields. It serves various purposes, primarily to summarize the code and explain the script’s purpose, required actions, and necessary inputs. Here, we are considering the Create PM Notification: Initial Screen to demonstrate the process and walk you through the following steps:

  1. Navigate to the IW21 screen and change the screen title
  2. Delete the unnecessary screen elements
  3. Rename the input field and add a text box
  4. Add a push button to execute the process
  5. Add a comment to notify the users about the information

User Interface

//Create the file SAPLIQS0.E0100.sjs inside your scripts folder for customizing the Create PM Notification: Initial Screen
//Now, add the Liquid UI script to the above file, and save it

  1. Login to SAP and navigate to the IW21 screen, change the screen title to Create PM Notification - Liquid UI using title(), as shown below.
     
    //Change the title to "Create PM Notification - Liquid UI"
    title("Create PM Notification - Liquid UI");
    
     
     
  2. Delete the Notification input field and Reference group box using del().
     
    //Deletes Notification and Reference
    del("F[Notification]");
    del("G[Reference]");
     
     
  3. Change the 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],[,"Enter Notification Information",{"name""z_iw21_textbox","textfont":"Arial","left":true,"textheight":"15","textweight":"5"});
     
     
  4. Add a pushbutton labeled Notify to execute the iwNotify21_copytext process on click.
     
    //Creates a pushbutton to execute the process.
    pushbutton("[16,35],"Notify",{"process":iwNotify21_copytext});
    
     
     
  5. Add a comment to notify the user about the notification information.
     
    //Creates 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?