Prerequisites
- Products: Liquid UI WS, Liquid UI Server or Local DLL, Client Software
- Commands: call(), return(), text(),
Purpose
The article demonstrates how to call a function module (BAPI_USER_GETLIST) to display the user list on the SAP Easy Access screen. The following steps will guide you through the process.
- Delete the image container on the SAP Easy Access screen
- Add a function to trim the string
- Call the function to display the user list
- Add a for loop to create texts
- Call the BAPI_USER_GETLIST function
Note: Ensure to provide the RFC parameters in the guixt.sjs file.
User Interface
//Create the SAPLSMTR_NAVIGATION.E0100.sjs file inside your scripts folder for customizing the SAP Easy Access screen
//Now, let's add the Liquid UI script to the above file and save it
Customization
- Delete the image container on the SAP Easy Access screen using del().
//Delete the image container on the SAP screen del("X[IMAGE_CONTAINER]");
- Add a function to trim the string.
//Function to trim all the blank spaces String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g,""); }
- Call the getUsersList function to display the user list.
//Displays the user details getUsersList();
- Add a for loop to create texts based on the number of users in the list.
//For loop to create the texts for(i=0; i<user_id.length; i++) { text([1+i,0], user_id[i]); }
- Call the BAPI_USER_GETLIST function using call().
//Function to get users list function getUsersList() { call('BAPI_USER_GETLIST',{'in.WITH_USERNAME':'&V[_user]','out.ROWS':'z_rows','table.USERLIST':'z_userslist'}); user_id = []; for(i = 0; i<z_userslist.length; i++){ temp = z_userslist.trim(); user_id.push(temp); } }
SAP Process
- Refresh the SAP screen to see a list of users on the SAP Easy Access screen. Scroll down to view the entire user list.