Author Topic: RFC CALL: BAPI_USER_GETLIST  (Read 5541 times)

lakshmi.k

  • GuiXT Forum
  • Newbie
  • *
  • Posts: 7
    • View Profile
RFC CALL: BAPI_USER_GETLIST
« on: March 18, 2024, 09:29:22 PM »
Purpose:
Below example demonstrates to display users list on Easy Access Screen by calling BAPI_USER_GETLIST function module.

Note:
To make the function module call, it is required to provide the rfc parameters in the configuration file i.e., guixt.sjs

Liquid UI Code:
----------------------------------------------------------------------------------------------------------------------------------------------------
Script File Name: SAPLSMTR_NAVIGATION.E0100.sjs
----------------------------------------------------------------------------------------------------------------------------------------------------
del("X[IMAGE_CONTAINER]");       //Deletes the image container on the Easy Access Screen

String.prototype.trim = function () {
   return this.replace(/^\s+|\s+$/g, "");
}

getUsersList();         //Calls the getUserList function and executes it

//To create text based on the number of users in the list
for(i=0; i<user_id.length; i++){
   text([1+i,0], user_id);
}

//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);       
    }
}