Liquid UI Forum

Using Your Liquid UI Products => WS aka Web Scripts (Attended RPA for SAP) => Topic started by: Benjamin Dasari on June 28, 2017, 02:33:37 PM

Title: Restrict SAP Menu Item selection
Post by: Benjamin Dasari on June 28, 2017, 02:33:37 PM
Purpose: Restrict user selection from menu items by deleting/hiding all menu items.

Liquid UI Code:
----------------------------------------------------------------------------------------------------------------------------------------------
Script File Name: SAPMLSMTR_NAVIGATION.E0100.sjs
----------------------------------------------------------------------------------------------------------------------------------------------
// Function to hide all Menu items on SAP screen
function deleteAllMenuItems() {
   for(i=1;i>0;i++) {
      for(j=1;j>0;j++) {
         if(!<'M['+i+','+j+']'>.isValid)   break;
         del('M['+i+','+j+']');
      }
      j = 1;
      if(!<'M['+i+','+j+']'>.isValid)   break;
   }
}

// Call the function on the screen where the menu items should be hidden/disabled
deleteAllMenuItems();