public bool MenuSelectionByID(string strMenuID)
        {
            GuiSession SapSession = getCurrentSession();
            GuiMenu    menu       = (GuiMenu)SapSession.ActiveWindow.FindById(strMenuID, "GuiMenu");

            menu.Select();
            return(true);
        }
Beispiel #2
0
        public static void MenuSelect(string id, GuiMenu menu, GuiSession session)
        {
            if (menu == null && string.IsNullOrEmpty(id))
            {
                throw new Exception("Parameters for the Target object not provided: id or GuiMenu object");
            }

            if (session == null)
            {
                throw new Exception("SAP session parameter is required and was not provided.");
            }

            if (menu == null)
            {
                menu = (GuiMenu)(session).FindById(id);
            }
            menu.Select();
        }