Prerequisites
- Products: Liquid UI WS, Liquid UI Server or Local DLL, Client Software
- Commands: pushbutton(), copytext(), text(), title(), set(), textbox(), onscreen
Purpose
Learn how to send notification details from one screen to another as per the requirement to create a notification. To explain this, we’ll walk you through the following steps.
- Change the title of the screen using title()
- Delete the Reference group box
- Customize the screen based on the transaction
- Add a function to copy and send the notification details
//Create this file inside your script folder for customizing the Create Notification screen SAPLIQSO.E0100.sjs
//Now, let's add the Liquid UI script to the above file and save it.
- Navigate to IW21 (Create PM Notification: Initial Screen) and change the title of the screen to Create PM Notification - Liquid UI, as shown below:
//Changes the title of the screen title("Create PM Notification - Liquid UI");
- Using the del command, delete the Reference group box existing on the screen.
// Deletes the reference group box del("G[Reference]");
- Assign a null value to the z_iw21_textbox1 variable.
set("z_iw21_textbox1","");
- Add a function to customize your screen with the required screen elements on the screen.
// Function to toggle the flag if(_transaction=="IW21") { text([7,25],"Enter Notification Information",{"size":30}); textbox([8,15],[14,66],{"name":"z_iw21_textbox1","enter text{":true,"textfont":"Arial","left":true,"textheight":"15","textweight":"5"}); pushbutton([16,29],"@12@Create Notification","?",{"process":iw21_copytext}); del("F[Notification]"); text("F[Notification type]","Select Notification type",{"intensified":true,"text":true}); }
- Add a function to copy the text entered in the Create PM notification initial screen to the textbox under the Maintenance request screen.
// Function to copy the text from initial screen to final screen function iw21_copytext(){ //Create PM Notification:Maintenance request enter(); onscreen 'SAPLIQS0.7200' copytext({"fromtext":"z_iw21_textbox1","toscreen":"X[TEXT]","append":true}); }
- Enter the Notification Type and notification details on the screen, as shown below; Click Create Notification.
- You will see the notification details copied from the initial screen to Create PM Notification: Maintenance Request screen, as shown below.
This article is part of the Screens combination/aggregation tutorial.
Next Steps
Get server name using _ashost variable
Learn how to acquire the SAP server name and customize the screen based on the SAP server.
Learn how to acquire the SAP server name and customize the screen based on the SAP server.
5 min
This article is also a part of the Conditional scripts tutorial.
Attached files: sapliqs0.e0100.SJS, sapliqs0.e0100.sjs