Liquid UI - Documentation - 17.03 Automatically select/deselect the checkbox

17.03 Automatically select/deselect the checkbox


Prerequisites


Purpose

In this article, you will learn how to select and unselect the checkbox automatically on a list screen. We'll guide you through the following steps.

  1. Add a toolbar push button
  2. Add a function to select the checkbox
  3. Add a function to unselect the checkbox
 

Note: This feature is available from WS Version 1.2.296.0 and Liquid UI Server Version 3.5.524.0 onwards!


User Interface


//Create this file inside your script folder for customizing the SAP Easy Access Screen: SAPLSMTR_NAVIGATION.E0100.sjs and RLLB1300.E0120.sjs.

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

  1. Add a toolbar push button with the label NAVIGATE TO LIST SCREEN to execute the process lb13navigate on click.
     
    //Creates a toolbar pushbutton to navigate to list screen.
    pushbutton([TOOLBAR], "NAVIGATE TO LIST SCREEN", "/nLB13", {"process":lb13navigate}); 
     
     
  2. Add a function to set the values to the input fields.
     
    //Adds a function to set the values.
    function lb13navigate(){
    onscreen 'SAPML02B.0204'
    set('F[Warehouse Number]','001');
    set('F[Requirement Number]','F');
    set('C[Completed]','X');
    enter();
    }
     
  3. Add two toolbar push buttons: Select List Checkbox and Deselect List Checkbox.
     
    //Creates two toolbar pushbuttons to select and deselect the checkboxes when clicked.
    pushbutton([TOOLBAR],"SelectListCheckBox",'?',{"process":selectListCheckBox});   
    pushbutton([TOOLBAR],"DeSelectListCheckBox",'?',{"process":deselectListCheckBox}); 
     
     
  4. Add a function to select and deselect the checkboxes accordingly on click.
     
    //Adds a function to select and deselect the checkboxes. 
    // Function to check the list screen checkbox. 
    function selectListCheckBox() {
    onscreen 'RLLB1300.0120' set('#[4,1]','X');
    set('#[5,1]','X');
    enter('?');
    } // Function to uncheck the list screen checkbox function deselectListCheckBox(){
    onscreen 'RLLB1300.0120' set('#[4,1]',' '); set('#[5,1]',' '); enter('?');
     

SAP Process

  1. Logon to SAP and click on the ‘NAVIGATE TO LIST SCREEN’ toolbar pushbutton on the SAP Easy Access Screen. Then, you will be navigated to the Display Transfer Requirement: List for Requirement screen, as shown below.
     
     
  2. On the below list screen, click on ‘SelectListCheckBox’ to check the checkbox.
     
     
  3. On the below list screen, click on ‘DeSelectListCheckBox’ to uncheck the checkbox.
     

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