Hi Aakash,
You can have that by using Security Development tools. I used that tool and implemented the code of Ivan Kashperuk.
public void findMenuItemUserPath()
{
MenuFunction mf = new MenuFunction(element.args().menuItemName(), element.args().menuItemType());
str menuLabel;
boolean iterateMenus(SysDictMenu _menu)
{
SysMenuEnumerator menuEnum = _menu.getEnumerator();
SysDictMenu subMenu;
boolean found;
while (menuEnum.moveNext())
{
subMenu = menuEnum.current();
if (subMenu.isMenu() || subMenu.isMenuReference())
{
found = iterateMenus(subMenu);
if (found) // If found, just climb back up the stack
{
menuLabel = strFmt('%1/%2', subMenu.label(), menuLabel);
return found;
}
}
else if (subMenu.isMenuItem() && subMenu.isValid() && subMenu.isVisible() && subMenu.menuItem().name() == mf.name() && subMenu.menuItem().type() == mf.type())
{
menuLabel = subMenu.label();
return true;
}
}
return false;
}
if (iterateMenus(SysDictMenu::newMainMenu()))
{
info(strfmt('%1/%2', strUpr(curext()), menuLabel));
}
else
{
warning('Not found in the Main Menu');
}
}