About cathing menu events

Hello all!
I have a problem:
I want catch menu event if only My form active now. So how i can to set this condition?
For example, we have sample in COM UI DI (2.ToolBarCtrl). And if we will run this add-on, after that will  close add-on's form and will press "Next record" we will have Error (becouse add-on can't find form)...
Thank you.

You can check in the event if the active form is your form.
if SBO_Application.Forms.ActiveForm.FormTypeEx = "YourFormType" then

Similar Messages

  • Main VI Menu event calling a subVI front panel

    Hi all,
    I have a subVI whose front panel is loaded upon calling by a main VI.
    I call the subVI using a User-menu event.
    the subvi-properties are set to allow close window and i am not handling a 'panel close' event.
    The problem is....
    when i run the main VI and click on the menu that loads the subVI front panel, subVI window opens, and if i click on the window-close, the main VI hangs.
    i understand that the control remains with the subVI only and never returned to main VI after i close subVI panel.
    but is it the only way to handle the 'panel close event' or any other way out to solve this?

    Try running the VI with highlight execution turned on, and see if anything unexpected is happening, or you could post your vi and let us take a nosey
    Message Edited by yenknip on 09-12-2008 04:30 PM
    - Cheers, Ed

  • Documentation about Screen, Menu and Field Exits

    Hi all!!
    I need some documentation about Screen, Menu and Field Exits.
    I´m very interested specially on steps by steps.
    My mail is [email protected]
    Helpful posts will be rewarded.
    Thanks in advance and regards,
    Manuel.

    <b>Types of Exits </b>
    There are several different types of user exits. Each of these exits acts as hooks where you can attach or "hang" your own add-ons.
    <b>Menu Exits</b>
    Menu exits add items to the pulldown menus in standard SAP applications. You can use these menu items to call up your own screens or to trigger entire add-on applications.
    SAP creates menu exits by defining special menu items in the Menu Painter. These special entries have function codes that begin with "+" (a plus sign). You specify the menu item’s text when activating the item in an add-on project.
    <b>Screen Exits</b>
    Screen exits add fields to screens in R/3 applications. SAP creates screen exits by placing special subscreen areas on a standard R/3 screen and calling a customer subscreen from the standard screen’s flow logic.
    <b>Function Module Exits </b>
    Function module exits add functions to R/3 applications. Function module exits play a role in both menu and screen exits. 
    When you add a new menu item to a standard pull down menu, you use a function module exit to define the actions that should take place once your menu is activated. 
    Function module exits also control the data flow between standard programs and screen exit fields. SAP application developers create function module exits by writing calls to customer functions into the source code of standard R/3 programs. 
    These calls have the following syntax: 
    CALL CUSTOMER-FUNCTION ‘001’.
    Field Exits
    Field exits allow you to create your own programming logic for any data element in the Dictionary. You can use this logic to carry out checks, conversions, or business-related processing for any screen field.  Example: The data element BBBNR identifies a company’s international location number. You might want to set up your R/3 System so that all international location numbers are larger than 100. 
    The field exit concept lets you create a special function module that contains this logic. 
    You assign the special function module to the data element BBBNR. You then assign the module to any programs and screens in which users can add new international location numbers. When you activate your field exit, the system automatically triggers your special routine whenever a user enters a company location number. 
    In 4.6c, you can use "RSMODPRF" program to create field exits.
    An example of a user exits :-
    MODULE user_exit_0001 INPUT 
        CASE okcode.
            WHEN 'BACK OR EXIT'.
                CASE sy-dynnr.
                        WHEN '100'.
                             SET SCREEN 0.
                             LEAVE SCREEN.
                        WHEN '200'.
    **** Note that you can write any code that satisfy your needs.                                                     ****
    **** But in this case, this was wrote as a sample code for reference sake.                                    ****
    **** And you can test it.                                                                                ****
                             SET SCREEN 100.
                             LEAVE SCREEN.
                 ENDCASE.
          ENDCASE.
    reward  points if it is usefull..
    Girish

  • I accidentally moved all my iPhoto events onto one.  I have a recent backup.  How do I go about recovering my events?

    I accidentally moved all my iPhoto events onto one.  I have a recent backup.  How do I go about recovering my events?

    You could try Events -> Autosplit Selected Event
    And you always need a back up. Always.

  • Applicaiton form hangs when trying to make C# form visible from menu event

    I have a MDI windows app, running as an addon on Verion 2007A
    The applicaion is written in C# ( VS 2005)
    I am a newbee to C# ( VS too ) as well.
    All I want is to display the MDI container form when a menu is clicked. But the windows form hangs forever, and does not show.
    if I try to show the form within Main method then no issues! The problem happens only off the SBO menu event .
    I cannot have the form loaded all the time. so I need the services of the SBO menu click, so a user can open it whenever he wants.
    Note: I can open any other form off the menu click, but that , provided they are not MDI containers and they are opened with ShowDialog(); If I use Show(); then again hangs.
    I tried opening the MDI form in Main method, ( wich of course works) and hide it when not needed. I could hide the form, but when I issued a command myForm.visible = true;  through the SBO menu event, again hangs!
    my applicaion Main function is as follows. The class AA_SBO_MAIN  holds the SBO application events.
    static void Main()
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Classes.AA_SBO_MAIN oSBOMain = null;
                oSBOMain = new Classes.AA_SBO_MAIN(); 
                 Application.Run();        
    the menu event simply does
                  frmMain fm = new frmMain();
                  fm.Visible = true;

    Hi
    I try doing these few steps and it seems to work!  The code is in Visual Basic though!
    Declare the form variable
    Private mMDI As New frmMDI
    In your menu click event enter a code like this
    If mMDI Is Nothing Then mMDI = New frmMDI
    mMDI.Visible = True
    On your startup function do something like this
    Public Sub New()
           mMDI.Show() : mMDI.Visible = False
    End Sub
    And more important ... in the form class comment all the code inside the Dispose method
    and finally do the following
    Private Sub frmMDI_Closed(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Closed
            Me.Hide()
    End Sub
    it seems to work for me . Hope it helps you too!

  • InDesign CS5 crashes on menu events

    If I install a menu event with applescript, indesign CS5 crashes if the last event handler contains commands from the UI Suite (make dialog...). The dialog appears, but after selecting something indesign crashes. I tried everthing that I know. Event handlers without dialogs and with standard apple script dialogs (display dialog) are running fine. Does anybody made similar experience?

    Excellent information - but it didn't seem to help.
    I renamed the two files, opened the application again and saw the same behavior. The system did add new InDesign Defualts and InDesign SavedData files - that were much smaller than the renamed ones.
    Just  note, this is a new computer - I did not have InDesign CS4 loaded on this laptop.
    Also, we have two licenses. The person using the second license has exactly the same problem.
    Any other ideas?? Thanks again.

  • Loading screen painter form via a menu event.

    Hi,
    In my application, I am trying to get my screen painter form (.srf) to display through a menu event. The thing is when I click on the menu the first time it loads okay but when I close it and try to open it by clicking it again nothing happens. I am doing it as below.
    Anyone have any ideas?
    private void SBO_Application_MenuEvent(ref SAPbouiCOM.MenuEvent pVal, out bool BubbleEvent)
                BubbleEvent = true;
                try
                    if ((pVal.MenuUID == "vdetails") & (pVal.BeforeAction == false))
                        Form_1();
                catch (Exception ex)
                    SBO_Application.MessageBox(ex.Message, 1, "Ok", "", "");
    private void Form_1()
                string strTmp = "vclMgt.srf";
                LoadFromXML(ref strTmp);
                oForm = SBO_Application.Forms.Item("frmVMGT");
    private void LoadFromXML(ref string FileName)
                System.Xml.XmlDocument oXmlDoc = null;
                oXmlDoc = new System.Xml.XmlDocument();
                string sPath = null;
                sPath =  System.IO.Directory.GetParent(System.IO.Directory.GetParent(Application.StartupPath).ToString()).ToString();
                oXmlDoc.Load(sPath + @"\" + FileName);
                string strXML = oXmlDoc.InnerXml.ToString();
                SBO_Application.LoadBatchActions(ref strXML);

    Hi Binita,
    Thank you for your suggestion but it hasnt worked, the form doesnt display and no errors appear.
    This is how i've done it in C#
    private void SBO_Application_MenuEvent(ref SAPbouiCOM.MenuEvent pVal, out bool BubbleEvent)
                BubbleEvent = true;
                try
                    if ((pVal.MenuUID == "vdetails") & (pVal.BeforeAction == false))
                        foreach (SAPbouiCOM.Form oForm in SBO_Application.Forms)
                            if (oForm.UniqueID == "frmVMGT")
                                found = true;
                                MessageBox.Show("Found");
                        if (found == true)
                            SBO_Application.Forms.Item("frmVMGT").Select();
                        else
                            LoadFromXML("vclMgt.xml");
                catch (Exception ex)
                    SBO_Application.MessageBox(ex.Message, 1, "Ok", "", "");
    Where 'found' is global.
    I saw a similar issue someone else had but it wasnt resolved.
    Any more ideas?

  • How to handle main vi short cut menu event in subvi

    I am making a thin GUI with a subVI to handle all the events including top VI UI events. I can get most of the events working but not with the short cut menu events. What I did was to pass the top VI control reference to a subVI and then registered for dynamic event. The event refnum is then passed on to another subVI next to it with the actual event structure where the top VI control's short cut event was handled. (using two separate subVIs definitely helped clean up the code, and I don't suspect it is the problem as other events worked fine in this structure)
    After not able to get it to work, I also tried to register the dynamic event inside the event structure of the 2nd subVI mentioned above, which still not working. Your help is greatly appreciated.

    I do have another problem related to handling top VI events in a subVI:  as my top VI controls were set as "Latch When Released", they cannot be located inside the event structure anymore, the result is that even though I can have their events correctly handled, those controls will stay pressed and not returning to the latch state as previously when I had the event structure located in the top VI itself.
    As I have to many controls, I dont want to change their mechanical action state and just wish to have an easier solution. Thanks.

  • Menu Event - Loading srf or xml forms.

    Does anyone have working C# code that loads a form created using screen painter through a menu event?
    When i try loading my xml or srf forms through a menu event, the forms load the first time but when the user clicks on the menu the second time the form doesnt appear. I cannot seem to find a solution to this!!

    Vitor,
    Here is the code:
    private void SBO_Application_MenuEvent(ref SAPbouiCOM.MenuEvent pVal, out bool BubbleEvent)
                BubbleEvent = true;
                try
                    if ((pVal.MenuUID == "vdetails") & (pVal.BeforeAction == false))
                            load();
                catch (Exception ex)
                    SBO_Application.MessageBox(ex.Message, 1, "Ok", "", "");
    private void load()
                string strTmp = "vclMgt.srf";
                LoadFromXML(ref strTmp);
                oForm = SBO_Application.Forms.Item("frmVMGT");
                oForm.Visible = true;
    private void LoadFromXML(ref string FileName)
                System.Xml.XmlDocument oXmlDoc = null;
                oXmlDoc = new System.Xml.XmlDocument();
                string sPath = null;
                sPath = System.IO.Directory.GetParent(System.IO.Directory.GetParent(Application.StartupPath).ToString()).ToString();
                oXmlDoc.Load(sPath + @"\" + FileName);
                string strXML = oXmlDoc.InnerXml.ToString();
                try
                    SBO_Application.LoadBatchActions(ref strXML);
                catch (Exception ex)
                    SBO_Application.MessageBox(ex.Message, 1, "Ok", "", "");

  • Call Menu Event from code

    Good Day
    Experts:
    I would like to call a MenuEvent from code in one of my forms.  A Sub in my Main.vb class called MenuEvent handles which form to open:
    MenuEvent(ByRef pVal As SAPbouiCOM.MenuEvent, ByRef BubbleEvent As Boolean)
    I cannot figure out how to call that MenuEvent from in my form code.  So far I have:
    <b>Project.Class.MenuEvent(test, True)</b>
    test is defined as:
    <b>Dim test As SAPbouiCOM.MenuItem
    test = "AddOper"</b>
    When I run the code to try and call this MenuEvent, I get an error "Unable to cast object System.String to type SAPbouiCOM.MenuItem"
    Does anyone have an feedback that might help me call a MenuEvent from my form code?
    Thanks,
    EJD

    Thanks for the Response Ad
    I did not explain well.  The MenuEvent Sub I have here refers to a Menu that I am loading as an AddOn.  From that menu I am loading forms/screens that were written in VB.Net.  Here is the code for a few of the forms/screen calls in my MenuEvent sub:
    Public Shared Sub MenuEvent(ByRef pVal As SAPbouiCOM.MenuEvent, ByRef BubbleEvent As Boolean)
            Try
                Select Case pVal.MenuUID.ToUpper
                    Case "Test_WO"
                        Dim WOForm As New Test_WO
                        BubbleEvent = False
                    Case "Test_AddOper"
                        Dim WOAddOperForm As New Test_AddOper
                        BubbleEvent = False
                 End Select
            Catch ex As Exception
                HandleException("Event Handler - Menu Event Handler", ex, False)
            End Try
        End Sub
    I want to make a call from this MenuEvent while inside a form/sceen.  This way the User does not have to go back to the Menu list and click on it.  So, I need to call <b>Public Shared Sub MenuEvent(ByRef pVal As SAPbouiCOM.MenuEvent, ByRef BubbleEvent As Boolean)</b> from inside a form/screen.  I canot figure out the syntax to make the Case "Test_WO" fire from inside my form.
    Can you help?
    Thanks,
    EJD

  • Some info about simulating different events in java or jsp...

    I work as a developer and I and some collegues of mine have been thrown in to a web portal project based on Struts/Spring framework.
    Since a long gone external consult made most of the initilal work in the project and we are kind of newbis to web-development many questions have been arised so I hope my questions isn't to strange.
    We are using something called Struts Bridge which uses a RenderAction when rendering the jsp and a ProcessAction for all submits from the jsp...
    Due to the fact that the whole Portal with all menues are configured in a xml-file also means that the startpage is some kind of hardcoded and thats what we want to change. By having a Welcome page without any buttons we want to depending on type of order automatically redirekt to the right jsp-page.
    To do this we tried to, in the execute-method, directly forward to the right jsp-page in the RenderAction but this doesn't work...
    Then we tried to simulate a menuitem-click in the ProcessAction(which work if an submit is done) but since we dont know how to simulate an submit in the Welcome jsp-page the ProcessAction is never called... so we are totally stucked...
    Can anyone explain what kind of events is possible use in the jsp and java files ?
    Maby I'm totally out of scope here but please enlighten me...

    I understand that its difficult to answer this kind of question whithout any code, was more looking for a general suggestion about how others have solved this kind of problem...
    Anyway... if I put a button on the jsp page and click it manually everything works fine but we need to know how to simulate the buttonclick "by code".
    It seem like all events in this kind of web development must be trigged by actually doing a submit on a jsp-page but there must be more ways to "by code" generate an event or am I wrong?

  • JavaFX 2.3 Mac OS X "Preferences" and "About" screen menu entries

    Hi there,
    I'm currently using the 1.7.0_10 JDK and JavaFX 2.3 under Mac OS X 10.7.5 and was wondering if it is possible to move the menu entries "Preferences" and "About Application..." to the standard Mac screen menu locations, means under the application menu? If anybody could provide a code snippet or a hint how to achieve this, that would be great.
    Thanks Steffen.

    Repair permissions with Disk Utility.

  • Menu Events in Matrix

    Hello,
    I created an UDO with Document and Document Lines.
    The Document Lines reside in a Matrix.
    Everything works fine but:
    The System Menus like "Delete Row(Ctrl+K)" are disabled while working in this UDO Form.
    How can I fix this?
    Can someone help?
    Thanks in advance.
    Rudy.
    Message was edited by: Ruediger Gertz

    Hello Trinidad,
    thank you for you promptly answer.
    Yes. The form mode is changing, but the addon don't receive the event(sometimes).
    For the 2nd problem: How can I receive the keyboard shortcut "Ctrl+K" while the cursor is in the matrix.
    I would like to remove the system "row delete" menu temporarly and replace it with my own menu entry. But I want to keep the normal usability for the user (Ctrl+K = remove a line from the matrix).
    Is there a chance to do something like that?
    In my own event tracker tool, I can't see any event fired, when I type Ctrl+K while the curser is in a matrix cell...
    Thank you in advance.
    Rudy.
    Message was edited by: Ruediger Gertz

  • Clarification about OCI_FO_REAUTH failover event of TAF

    Hello everyone,
    Can someone explain my the real meaining of the OCI_FO_REAUTH failover event when we are using TAF?
    All I found is : "OCI_FO_REAUTH indicates that you have multiple authentication handles and failover has occurred after the original authentication. It indicates that a user handle has been re-authenticated. To find out which, the application checks the OCI_ATTR_SESSION attribute of the service context handle (which is the first parameter)."
    But it is not clear for me.
    Regards.
    Carl

    The session receiving this error did not automatically failover, or this automatic failover failed.
    This does not mean however that a new connection would not be possible
    Since you did not mention anything about the system, I can't tell you where to look for the reason.
    If it's a RAC consider looking at the CRS logs.
    This link explains more about the OCI_FO_ABORT : http://www.cs.umbc.edu/portal/help/oracle8/server.815/a67846/new_adva.htm
    Success!
    FJFranken

  • Quick Question About Simple Menu

    Can someone direct me to a link that has a tutorial for a SIMPLE vertical navigation menu with a submenu. Like a drop down menu but vertical where the main links are on the left and the submenues come out the right side of the menu. I dont need any bells and wistles and I am just learning so it doesnt need anything but a button link when rolled over more link options appear to the right. Is there a tutorial that is not a place trying to sell me this capability and actually works (CS3), no errors, broken links etc...just a how to for a SIMPLE menu with submenus.
    Sorry, I am getting frustrated...thanks

    Okay, just so that it might help someone else who is struggling to find a way to do this, I found a pretty good tutorial on how to make good drop down menus that can easily be made into a vertical pop-out menu as well. I was a bit surprised that there was so little valuable information regarding something that I would think is a pretty common thing, SIMPLE rollovers with submenus. Not only did I have a very difficult time JUST finding a tutorial on basic drop down menus (without all kinds of bells and whistles or people wanting to sell me a package), but there was nobody who could actually point me to the one truly helpful tutorial about the subject out there. So for those who might search I am going to put this link here to the only real thorough tutorial I could find about a simple drop down menu that can work both vertical and horizontal.
    It takes awhile because he is also explaining many things most people with basic knowledge about the program probably already knows but its clear and (SHOCK!) actually works well.
    http://www.tutvid.com/tutorials/flash/tutorials/as3DropDownMenus.php

Maybe you are looking for

  • Incorporate: For, and while loop,a nested pair for both,and to add graphics

    // I have done the class but need help one adding one while loop, one for loop, and a nested pair loops using for and while, and if posbile to add on a dynamite graphics. // i am doing this for a brithday present for my brother who is a java programe

  • Wireless Printer Problem

    In my office we have a HP LaserJet Pro 300 MFP M375nw Printer. We recently moved offices and now no one in the office is able to print wirelessly. The printer will only work when connected with the USB. The printer is connected to the same Wifi as al

  • EV After

    Hi, I was wondering if it was possible to have a ev_after function on the row and column in the same evdre report?  I'm noticing that the ev_after function works in both the column and the row except at the intersection where the ev_after(row) and ev

  • How to install Oracle 9iAS 1.0.2.2.2 from ebusiness suite installation media

    Hello: Can anyone help me guide how to install Oracle 9iAS 1.0.2.2.2 from ebusiness suite installation media with using Rapidwiz.  I'd like to use this as standalone installation for deploying 6i forms. Regards

  • Ai, fichiers liés, qualité d'affichage des png !

    Bonjour, Je travail sur une plaquette de démarchage, je souhaiterais incorporer un screenshot (png) de notre site dans notre plaquette. La résolution du screenshot est largement suffisante (pris depuis un écran rétina) . Quand j'incorpore mon png à l