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

17.03 Automatically select/deselect the checkbox


Prerequisites

Purpose

The article details how to select and deselect the checkbox automatically on a list screen using the push buttons. Here, we are considering the SAP Easy Access screen to demonstrate the process and walk you through the following steps:

  1. Delete the image container on the SAP Easy Access screen.
  2. Add a toolbar push button to execute the process.
  3. Add a function to set values to input fields.
  4. Add a function to select the checkbox.
  5. Add a function to deselect 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 the file SAPLSMTR_NAVIGATION.E0100.sjs inside your scripts folder for customizing the SAP Easy Access screen.
//Now, add the Liquid UI script to the above file and save it.

Customization

  1. Delete the image container on the SAP Easy Access screen using del().
     
    //Deletes the image container on the SAP screen
    del("X[IMAGE_CONTAINER]");
    
     
     
  2. Add a toolbar push button labeled NAVIGATE TO LIST SCREEN to execute the lb13navigate process on click.
     
    //Creates a toolbar pushbutton to execute the process
    pushbutton([TOOLBAR], "NAVIGATE TO LIST SCREEN", "/nLB13", {"process":lb13navigate});
    
     
     
  3. Add the lb13navigate function to set the values for the input fields.
     
    //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();
    }  
    

    //Now, let's add the below Liquid UI script to the RLLB1300.E0120.sjs file and save it.

  4. Navigate to Display Transfer Requirement: List for Requirement screen and add two toolbar push buttons labeled SelectListCheckbox and DeselectListCheckbox to select and deselect the checkboxes.
     
    //Creates toolbar push buttons to select and deselect the checkboxes.
    pushbutton([TOOLBAR],"SelectListCheckBox",'?',{"process":selectListCheckBox});   
    pushbutton([TOOLBAR],"DeSelectListCheckBox",'?',{"process":deselectListCheckBox});
    
     
     
  5. Add the SelectListCheckBox function to select the check box.
     
    // Function to check the list screen checkbox.
    function selectListCheckBox()
    {
        onscreen 'RLLB1300.0120'
    set('#[4,1]','X');
            set('#[5,1]','X');            
            enter('?');
    }
    
  6. Add the deselectListCheckBox function to uncheck the list screen checkbox.
     
    //Function to uncheck the list screen checkbox
    function deselectListCheckBox(){
    onscreen 'RLLB1300.0120'
    set('#[4,1]',' ');   
    set('#[5,1]',' ');        
    enter('?');
    }
    

SAP Process

  1. Refresh the SAP screen, and click the NAVIGATE TO LIST SCREEN toolbar push button. Then, you will be navigated to the Display Transfer Requirement: List for Requirement screen, as shown in the image below.
     
     
  2. Click the SelectListCheckBox to check the checkbox, as shown in the image below.
     
     
  3. Now, click the DeSelectListCheckBox button to uncheck the checkbox, as shown in the image below.
     
     

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