Liquid UI - Documentation - 17.07 Copy text from one screen to another screen

17.07 Copy text from one screen to another screen



Purpose

In this article, you will learn how to use the text() command in different scenarios.

 

SyntaxDescription
text([row_number,col_number],"Text Label",{option:"optionvalue"}); Adds text to a SAP screen.
var z_txt = "text"; text([rows,cols],+z_txt); Adds text to a SAP screen from a variable.
text("C[checkboxName]","New Name"); Changes a checkbox's name.
text("F[fieldName]","New Name"); Changes an input field's name.
text("O[optionMenu_label]","New option menu label"); text("O[functionKey_label]","New function key label"); Changes the label of a context menu or a function key.
text("P[pushbuttonName]","New Name"); Changes a pushbutton's name.
text("R[radiobuttonName]","New Name"); Changes a radio button's name.
text("T[tabName]","New Name"); Changes a tab's name.


User Interface

Text display using variable

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

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

In this example, we will customize the Create PM Notification: Initial Screen using the Liquid UI through the following steps. 

  1. Using the title(), change the title of Create PM Notification: Initial Screen to Create PM Notification - Liquid UI.
     
    //Changes the title to "Create PM Notification - Liquid UI"
    title ("Create PM Notification - Liquid UI");
     
     
  2. Using the del(), delete Notification input field and Reference group box.
     
    //Deletes Notification and Reference input field 
    del("F[Notification]");
    del("G[Reference]");
     
     
  3. Using the text(), 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 text box 
    text("F[Notification type]","Select Notification type",{"text":true});
    text([7,30],"Enter Notification Information");
    textbox([8,15],[14,66],{"name":"z_iw21_textbox","textfont":"Arial","textheight":"15","textweight":"5"});
     
     
  4. Add a push button “Notify” to execute the process iw21_copytext when clicked.
     
    //Creates a pushbutton with the label Notify. 
    pushbutton([16,35],"Notify",{"process":iw21_copytext}); 
     
     
  5. Add a function to copy the notification to the next screen.
     
    //Adds a function to copy the notification entered in the text box to next screen.
    function iw21_copytext()
    { //Create PM Notification:Maintenance request onscreen 'SAPLIQS0.7200' copytext({"fromtext":"z_iw21_textbox","toscreen":"X[TEXT]"}); }
     

SAP Process

  1. Now, select the notification type and enter the notification details in the Enter Notification Information box. Click on Notify pushbutton to navigate to the final notification screen, as shown below.
     
     

Text display using variable

// Create this file inside your script folder for customizing the Create PM Notification: Initial screen. SAPLMGMM.E0060.sjs

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

  1. Let us create a text with respect to the Material input field on Create Material (Initial Screen). Add a text field with the label Raw Material, as shown below.
     
    //Creates text Raw Material parallel to the Material input field 
    text("F[Material]+[0,46]","Raw Material");


SAP Process

  1. Logon to SAP and navigate to the MM01 transaction, you can see the text “Raw Material” is displayed parallel to the material input field, as shown below.
     
     

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