Using Your Liquid UI Products > WS aka Web Scripts (Attended RPA for SAP)

SAP Role Authorized Execution in Liquid UI

(1/1)

Rahul Gera:
/* *******************************************************************
Function: getAuthorizations
Parameters:

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

/* *******************************************************************
Function: roleExists
Parameters:
   roleName
Purpose: Checks to see if current user has the roleName match
******************************************************************* */
function roleExists(roleName){
   for (ii = 0; ii < Z_ROLES.length; ii++)   {
      var z_userrole = Z_ROLES[ii].toString().substring(0,30).trim();
      if(z_userrole == roleName) {
         return true;
      }
   }
   return false;
}

Navigation

[0] Message Index

Go to full version