Hi
I am trying to get the User Menus using NetWeaver UI Services, however it doesnot return the correct entries. The services are activated in SICF, I can get the User Details but not able to get the Menus
Here is the code,
var user = sap.ui2.shell.getUser();
user.load(
{
// depthAtRoot: 1,
// nodeId: " ",
// depthAtNode: 1
},
function() {
//set user data in the json model
Alert(user.getFullName());
//Get the Menus
var menus = user.getMenu().getEntries();
var length = menus.length;
alert("length::"+length); //Length returned is Zero
},
function(sErrorMessage) {
/* failure handler: e.g. display load error */
alert(sErrorMessage);
}
);
What could be wrong here?
Regards