Liquid UI Forum

Using Your Liquid UI Products => WS aka Web Scripts (Attended RPA for SAP) => Topic started by: Rahul Gera on February 23, 2017, 11:50:29 AM

Title: SAP Profile Authorized Execution in Liquid UI
Post by: Rahul Gera on February 23, 2017, 11:50:29 AM
/* ******************************************************************
Function: getAuthorizations
Parameters:

Purpose: Calls function to read user SAP Profile
****************************************************************** */
function getAuthorizations(){
   call('BAPI_USER_GET_DETAIL', {"in.USERNAME":"&V[_user]","table.PROFILES":"Z_PROFILES"});
}

/* ******************************************************************
Function: profileExists
Parameters:
   profileName
Purpose: Checks to see if current user has the profileName match
****************************************************************** */
function profileExists(profileName) {
   for (ii = 0; ii < Z_PROFILES.length; ii++)   {
      if(profileName == Z_PROFILES[ii].toString().substring(0,12).trim()) {
         return true;
      }
   }
   return false;
}