Liquid UI - WS Reference Library

Function Module Call


Runs On

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


This is an example of calling a Function Module using WS. In this example, we will use the Function Module BAPI_USER_GET_DETAIL display information on a screen.

User Interface

Log into SAP and the FM call will run automatically. It will display information about the user’s defaults and what type of user authorization it is (e.g. “Super”).

The data we are pulling from in BAPI_USER_GET_DETAIL comes from the LOGONDATA output and the PARAMETERS table.

NOTE: When using the call command, be sure to have the correct RFC parameters in your guixt.sjs configuration file.

Liquid UI Script


// Author: Synactive, Inc. [1065 E. Hillsdale Blvd, Foster City, CA, 94404, USA]
// Email:;;
// Contact: 650.341.3310
// Version:

// This allows a string to be trimmed of all blank spaces
String.prototype.trim = function() {
    return this.replace(/^\s+|\s+$/g,"");
// Clear the screen of all elements

// Run the function

// Run a for loop to dynamically create the text
for(i=0; i<param_id.length; i++)
    text([1+i,0], param_id[i]+": "+param_val[i]);
// Create a group box to hold the data witha  title involving the user and the user's class
box([0,0],[i+1,38],"Defaults for "+_user.trim()+" ("+z_class+")");

// This function makes the call to the Function Module and pulls the data to display
function getDetailFromFM(){
    println("In this function.")
    call("BAPI_USER_GET_DETAIL", {"in.USERNAME":"&V[_user]", "out.LOGONDATA":"z_logondata", "table.PARAMETER":"z_parameters"});
    // extract the user's class type
    z_class = z_logondata.substring(17,29).trim();

        // create two arrays
    param_id = [];
    param_val = [];
    // run a for loop to go through the table and store each value we want
    for(i = 0; i<z_parameters.length; i++){
        tmp = z_parameters[i].substring(0,20).trim();
        tmp = z_parameters[i].substring(20,38).trim();