Liquid UI - WS Reference Library

Searchhelp using Function Module


Prerequisites


Runs On

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

Purpose

On a Liquid UI inputfield we can bring F4 searchhelp display using function module. This method will allow to display custom field values and also restricted search help.

User Interface

Log into SAP and on the SAP Easy Access Screen you will see 1 Liquid UI inputfield and a button. On clicking the highlighted button below, it pulls up searchhelp using function module.

 

Liquid UI Script

//esession.sjs

//////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Author: Synactive, Inc. [1065 E. Hillsdale Blvd, Foster City, CA, 94404, USA]
// Email: support@guixt.com; sales@guixt.com;
// Contact: 650.341.3310
// Version: 1.0.0.0
//////////////////////////////////////////////////////////////////////////////////////////////////////////////

load('functions_plant.sjs');


//SAPLSMTR_NAVIGATION.E0100.sjs

//////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Author: Synactive, Inc. [1065 E. Hillsdale Blvd, Foster City, CA, 94404, USA]
// Email: support@guixt.com; sales@guixt.com;
// Contact: 650.341.3310
// Version: 1.0.0.0
//////////////////////////////////////////////////////////////////////////////////////////////////////////////

del("X[IMAGE_CONTAINER]");

inputfield( [2,3], "Plant", [2,10],{ "name":"z_plant", "size":4});
pushbutton([2,15], "@8D@", {"process":getPlantList,"size":[1,2]});

//functions_plant.sjs

//////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Author: Synactive, Inc. [1065 E. Hillsdale Blvd, Foster City, CA, 94404, USA]
// Email: support@guixt.com; sales@guixt.com;
// Contact: 650.341.3310
// Version: 1.0.0.0
//////////////////////////////////////////////////////////////////////////////////////////////////////////////

function getPlantList(){
    plantValue = [];
    call("Z_GUIXT_GET_PLANT",{"table.TBL_PLANT":"plantValue"});
    if(plantValue.length > 0){
        enter('/o');
    }
}

function selectPlant(param){
    enter('/12');

    onscreen '*'
        set("V[z_plant]",param.l_plant);
        enter('?');
}
    
function exitPopup(){
    enter('/12');
}

//RSM04000_ALV.E2000.sjs

//////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Author: Synactive, Inc. [1065 E. Hillsdale Blvd, Foster City, CA, 94404, USA]
// Email: support@guixt.com; sales@guixt.com;
// Contact: 650.341.3310
// Version: 1.0.0.0
//////////////////////////////////////////////////////////////////////////////////////////////////////////////

clearscreen();
windowsize([0,2,105,10]);

title("Select Plant");

del("P[Generate]");            // Toolbar Button on Popup
del("P[End Session]");        // Toolbar Button on Popup
del("P[Continue]");            // Toolbar Button on Popup
text('P[Cancel]','@02@Cancel');

if(plantValue.length > 0){
    rowNumber = 0;        // Row Number to start painting controls on the screen
    colNumber = 1;        // Column Number to start painting controls on the screen
    plantNumber = '';
    
    for (var loop=0; loop<plantValue.length; loop++){
        if (colNumber > 100){    // On the screen, if the width of the screen exceeds 100, then draw controls on next row
            rowNumber+=3;
            colNumber=1;
        }
        plantNumber = plantValue[loop].substring(0,4).trim();

        pushbutton([rowNumber,colNumber],plantNumber,{"process":selectPlant, 'using':{'l_plant':plantNumber},"size":[2,5]});
        colNumber+=7;
    }
}


onUIEvents['/12']={"process":exitPopup};
onUIEvents['Enter']={"process":exitPopup};