Liquid UI - WS Reference Library

Read Grid Selection Data


To read data from a grid screen based on user selection. On user entry of Plant and clicking the ‘Grid Example’ pushbutton will take the user to Grid screen to make user selection and read the Status, Total Qty and Delivered Qty fields.

User Interface

Log into SAP and on the SAP Easy Access Screen you will see the input field to enter the Plant and click the ‘Grid Example’ pushbutton.

You can view the Order details with plant value 1000 as shown below.

Liquid UI Script


// SAP Easy Access Screen 
inputfield( [1,1], "Plant", [1,20], {"name":"z_coois_plant", "size":4});
inputfield( [2,1], "Status", [2,20], {"name":"z_coois_status", "readonly":true, "size":40});
inputfield( [3,1], "Total Qty", [3,20],{ "name":"z_coois_totalqty", "readonly":true, "size":16});
inputfield( [4,1], "Delivered Qty", [4,20],{ "name":"z_coois_delivqty", "readonly":true, "size":16});
pushbutton( [1,26], "Grid Example", {"process":gridExample});


// Grid Display Screen
onUIEvents['/2'] = executeGridSelection();                              // When user double clicks on a selection in the first column, the function is executed
if(_transaction == 'COOIS' && z_coois_selection =='X'){

// SAPLCOKO1.E0115.sjs

// Grid Details Screen
if(z_coois_getselection == 'X'){

// grid_functions.sjs

// Functions File

// Function to take user input and land on grid screen in COOIS transaction
function gridExample(){
   var z_coois_msg = '';
   onscreen 'SAPLSMTR_NAVIGATION.0100'

   onscreen 'PPIO_ENTRY.1000'
      set('F[S_WERKS-LOW]','&V[z_coois_plant]');               // Production plant
   onscreen 'SAPMSDYP.0010'
   onscreen 'PPIO_ENTRY.1000'
         goto FUNC_END;

// Function to set a flag on the Grid Display screen to avoid infinite loop on auto-enter
function executeGridSelection(){

// Function to read information from Grid Details screen based on user selection on Grid Display
function readGridDetails(){
   onscreen 'SAPLCOKO1.0115'
      set('V[z_coois_status]','&F[CAUFVD-STTXT]');                 // Status
      set('V[z_coois_totalqty]','&F[CAUFVD-GAMNG]');             // Total Qty
      set('V[z_coois_delivqty]','&F[CAUFVD-GWEMG]');            // Deliv. Qty