Liquid UI - WS Reference Library

Clear Liquid UI table


Runs On

  SAP GUI Android iOS WM Web
Direct Connect          
Liquid UI Server Connect


Clear all or few of the columns of a Liquid UI table.

User Interface

Log into SAP and on the SAP Easy Access Screen click on ‘Retrieve Material Descriptions’ to retrieve Material and Description values.

Click on ‘Clear Descriptions’ to clear only the Description column or ‘Clear Table’ to clear all columns.

Liquid UI Script


// Function to clear the Liquid UI table based on parameters
function clear_values(tablename,columnArray,rows){    
    for (var loop=0;loop<rows;loop++){
        for (var col=0;col<columnArray.length;col++){    
            tablename[columnArray[col]][loop] = "";
// Function to display Material/s on the Liquid UI table
function showMatlData(){
    // Sample Materials and Descriptions
    var matDataArr = [];
        matDataArr.push({key:'Material '+i+'',value:'Description'+i+''});
    // Populating table with Material numbers
        matl_table.z_matl[i] = matDataArr[i].key;
        matl_table.z_matl_desc[i] = matDataArr[i].value;
// Function to only clear the Description column
function clearTableDesc(){
    if(typeof matl_table =='object'){
// Function to clear all columns
function clearTable(){
    if(typeof matl_table =='object')
        clear_values(matl_table, ["z_matl","z_matl_desc"],20);
// User Interface
// Liquid UI table and columns
table([1,1],[20,50],{"name":"matl_table","title":"Material Info","rows":20});
pushbutton([21,1],"@01@Retrieve Material Descriptions",{"process":showMatlData});
pushbutton([23,1],"@01@Clear Descriptions",{"process":clearTableDesc});
pushbutton([25,1],"@01@Clear Table",{"process":clearTable});

Was this information helpful? Send Feedback