When menu item is clicked i'm unable to call user form to my b1

hi every one,
i'm new to b1 sdk. i have written some code to handle menuevents. when an item on menu is clicked a form should open ...such that i have written some code which is shown below....but when i'm debugging ..after entering the control into createmysimpleform() it is not moving further....
plz provide me some help in this regard...
======================================================================================================
CODE
===================================================================================================
  Private Sub SBO_Application_MenuEvent(ByRef pVal As SAPbouiCOM.MenuEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.MenuEvent
=============================================================================================
        If (pVal.MenuUID = "SM_VID_F1") And (pVal.BeforeAction = true) Then
            SBO_Application.MessageBox("Rajender")
            If (pVal.MenuUID = "SM_VID_F1") And (pVal.BeforeAction = true) Then
                SBO_Application.MessageBox("My first Menu was clicked")
                CreateMySimpleForm() ' to call the user form for which the code is written in another sub program
            End If
        Else
            If (pVal.MenuUID = "SM_VID13") And (pVal.BeforeAction = False) Then
                SBO_Application.MessageBox("My Second Menu was clicked")
            End If
        End If
Private Sub CreateMySimpleForm()
        Dim oItem As SAPbouiCOM.Item
        '// we will use the following objects to set
        '// the specific values of every item
        '// we add.
        '// this is the best way to do so
        Dim oButton As SAPbouiCOM.Button
        Dim oStaticText As SAPbouiCOM.StaticText
        Dim oEditText As SAPbouiCOM.EditText
        Dim oComboBox As SAPbouiCOM.ComboBox
        '// add a new form
        Dim oCreationParams As SAPbouiCOM.FormCreationParams
        oCreationParams = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)
        oCreationParams.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Fixed
        oCreationParams.UniqueID = "MySimpleForm"
        oForm = SBO_Application.Forms.AddEx(oCreationParams)
        oForm.Visible = True
        '// add a User Data Source to the form
        oForm.DataSources.UserDataSources.Add("EditSource", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 20)
        oForm.DataSources.UserDataSources.Add("CombSource", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 20)
        '// set the form properties
        oForm.Title = "Simple Form"
        oForm.Left = 400
        oForm.Top = 100
        oForm.ClientHeight = 80
        oForm.ClientWidth = 350
        '// Adding Items to the form
        '// and setting their properties
        '// Adding an Ok button
        '// We get automatic event handling for
        '// the Ok and Cancel Buttons by setting
        '// their UIDs to 1 and 2 respectively
        oItem = oForm.Items.Add("1", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
        oItem.Left = 6
        oItem.Width = 65
        oItem.Top = 51
        oItem.Height = 19
        oButton = oItem.Specific
        oButton.Caption = "Ok"
        '// Adding a Cancel button
        oItem = oForm.Items.Add("2", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
        oItem.Left = 75
        oItem.Width = 65
        oItem.Top = 51
        oItem.Height = 19
        oButton = oItem.Specific
        oButton.Caption = "Cancel"
        '// Adding a Rectangle
        oItem = oForm.Items.Add("Rect1", SAPbouiCOM.BoFormItemTypes.it_RECTANGLE)
        oItem.Left = 0
        oItem.Width = 344
        oItem.Top = 1
        oItem.Height = 49
        '// Adding a Static Text item
        oItem = oForm.Items.Add("StaticTxt1", SAPbouiCOM.BoFormItemTypes.it_STATIC)
        oItem.Left = 7
        oItem.Width = 148
        oItem.Top = 8
        oItem.Height = 14
        oItem.LinkTo = "EditText1"
        oStaticText = oItem.Specific
        oStaticText.Caption = "Static Text 1"
        '// Adding another Static Text item
        oItem = oForm.Items.Add("StaticTxt2", SAPbouiCOM.BoFormItemTypes.it_STATIC)
        oItem.Left = 7
        oItem.Width = 148
        oItem.Top = 24
        oItem.Height = 14
        oItem.LinkTo = "ComboBox1"
        oStaticText = oItem.Specific
        oStaticText.Caption = "Static Text 2"
        '// Adding a Text Edit item
        oItem = oForm.Items.Add("EditText1", SAPbouiCOM.BoFormItemTypes.it_EDIT)
        oItem.Left = 157
        oItem.Width = 163
        oItem.Top = 8
        oItem.Height = 14
        oEditText = oItem.Specific
        '// bind the text edit item to the defined used data source
        oEditText.DataBind.SetBound(True, "", "EditSource")
        oEditText.String = "Edit Text 1"
        '// Adding a Combo Box item
        oItem = oForm.Items.Add("ComboBox1", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX)
        oItem.Left = 157
        oItem.Width = 163
        oItem.Top = 24
        oItem.Height = 14
        oItem.DisplayDesc = False
        oComboBox = oItem.Specific
        '// bind the Combo Box item to the defined used data source
        oComboBox.DataBind.SetBound(True, "", "CombSource")
        oComboBox.ValidValues.Add("1", "Combo Value 1")
        oComboBox.ValidValues.Add("2", "Combo Value 2")
        oComboBox.ValidValues.Add("3", "Combo Value 3")
        '// set the form as visible
    End Sub

hi satish, thanks for ur reply...
i have 1 more doubt...plz try to solve this prob as soon as possible....
i have created a user form with some lables and textboxes... and buttons...
if i click on "adddata" button all the data i have entered in the form is inserted to DB...
i have placed 1 more button ...so as to make already entered data in textboxes values empty.... but it is not working when i wrote the code below.....
If (FormUID = "TestForm") And ((pVal.ItemUID = "13") And _
   (pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED) And (pVal.BeforeAction = True)) Then
            Clear() ' this is update records with respect to code value entered in form to DB
        End If
Public Sub Clear()
  oform.Items.Item("6").Refresh()
        oform.Items.Item("7").Refresh()
        oform.Items.Item("8").Refresh()
    End Sub
is there any other method that is should call to clear the data...???

Similar Messages

  • Running a method when an NSPopUpButton menu item is clicked

    I want to have a method be run every time one of my NSPopUpButton's menu items are clicked. Is there a delegate method that I need to use?

    No, but you can use an setAction in combination with an selector.

  • Setting visible/invisible when menu item is contained/not contained

    Hello All,
    I have a vertical rectangle (the containerButtonsRect) that contains menu items (text). The items slide up and down when using up and down keys. When the items go out the container I want to make them invisible. When they come back in the containerButtonsRect I want to make them visible. The following code does not work:
    override public function create(): Node {
            for (i in [0..sizeof labelButtons - 1]) {
                def menuItem:MenuItem = MenuItem {
                            x: bind containerButtonsRect.x
                            y: bind (containerButtonsRect.y + (i+1)*ySpacing + i*maxButtonHeight)
                            width: bind containerButtonsRect.width
                            height: bind maxButtonHeight
                            content: labelButtons[i]
                            translateY: bind tracker*deltaY
                            visible: bind ((menuItem.y + translateY > containerButtonsRect.y) and ((menuItem.y + translateY + maxButtonHeight) < (containerButtonsRect.y + containerButtonsRect.height)))
                insert menuItem into menuItems;
                if (i == focusedIndexItem) {
                    menuItems[focusedIndexItem].selected = true;
                updateMaxSize(menuItem);
            return Group {
                content: bind [
                    containerButtonsRect,
                    selectionRect,
                    menuItems
        }It is strange that the following line:
    visible: bind ((menuItem.y + translateY > containerButtonsRect.y) and ((menuItem.y + translateY + maxButtonHeight) < (containerButtonsRect.y + containerButtonsRect.height)))does not do the job.
    Is there a better way to set the visible attribute based on the logic described above?
    Thanks.
    Edited by: sacchett88 on Jun 9, 2010 2:10 PM

    Thank for the response.
    The translateY is set to provide vertical motion. A time line is controlling the tracker variable. So when I move arrow up/down the items scroll up/down.
    I agree JavaFX have way complicated the different variables you can set to position components and retrieve width and height. This cause a lot of problems hard to debug.
    Interesting your ideas of setting the clip of the group. I am not to familiar with that attribute as well the description in the docs: http://java.sun.com/javafx/1.3/docs/api/javafx.scene/javafx.scene.Group.html is poor:
    "Specifies a Node to use to define the the clipping shape for this Node."
    Is there any example you could point me out to ?
    Thanks.

  • When menu items are selected they become invsible

    when I select a menu item the words become invisible.

    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]
    If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    * Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    * Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")

  • Need to detect when an item is clicked in a combo box in flex 3

    Hello
    I am having a check box and a combo box whenever any selection is made in combo box (current selection may be same as previous selection), I need to select the check box.
    By default the 1st item in combo box is selected and check box is unselected. Now I want that while 1st item is clicked in combo box (although it is selected) , the check box must be selected.
    I have currently used the change event of combo box to do my task. But it is not working if I click on same item as selected item in combo box.
    Also, I thought to use close event of combo box, but that event dispatches in 4 situations out of which I can distinguish only 1 situation from DropDownEvent(for close).
    Please help me regarding this.
    I am using flex sdk 3.5
    Thanks in advance.

    You can use the Close Event to distinguish it.
    To pull out which item has been selected in the combo box, you use the code (in as3)
    ComboBox(event.target).selectedItem.label
    and through the the use of an if statement
    if (ComboBox(event.target).selectedItem.label == "labelName")
    you can distinguish the single situation from the others.

  • Unable to call a form from drill-down report

    hello
    i have a drill-down report, from where i wanna to call a transacation level form, so that user can modify the data from that transaction level form after seeing the result from report. After modification in data through form, report should be refreshed automatically.
    i am using form6i, can't user dde.app_begin because it starts a new session

    Hi,
    if this is for Forms on the web, just call the Reports from web.show_document() when closing the Forms (assuming you close the Forms after the update).
    If it is on client/server then you don't have a hook into Reports except you run a new Reports from Forms and close the Reports that called the Forms application (needs to be done within this Report)
    Frank

  • Unable to call a form from report

    hello
    i have a drill-down report, from where i wanna to call a transacation level form, so that user can modify the data from that transaction level form after seeing the result from report. After modification in data through form, report should be refreshed automatically.

    Hi,
    if this is for Forms on the web, just call the Reports from web.show_document() when closing the Forms (assuming you close the Forms after the update).
    If it is on client/server then you don't have a hook into Reports except you run a new Reports from Forms and close the Reports that called the Forms application (needs to be done within this Report)
    Frank

  • Some child chms don't display topic in topic pane when TOC item is clicked

    Okay. I'm not sure what's going on.
    We have a master project and various sub-chms that get merged into the TOC of that master project. We have a fairly new sub RH project named "Toolkit Modules" that generates three additional sub chms that are also merged into the master help. They appear at the very end of the master project's TOC:
    <master help's toc>
    <10 other merged chms>
    toolkitmodules.chm
    toolkitmodules_blade.chm
    toolkitmodules_vwmp.chm
    All the topics for the three toolkit modules chms exist in the Toolkit Modules project and are conditionally marked with topic-level build tags so that the right topics appear in their respective chm.
    I compiled the three toolkit chms and then put them in the master root directory so that when the master help is generated, they get included properly.
    At first glance, all three of these chms appear to be working fine in the master TOC. I can expand and view the master help's TOC for the sub projects just fine, but clicking on a TOC entry does not display
    the topics for these two chms in the topic pane:
    toolkitmodules_blade.chm
    toolkitmodules_vwmp.chm
    I'm not sure why.
    If I double-click and open up the individual chms from within Windows and view their contents, the topics appear as expected in those chms. It's just when merged, these latter two chms don't do anything from the TOC side. However, I have verified that the topics are indeed getting merged in, because I can use the Search tab to see the topics. In fact, the Locate button on the toolbar even expands the correct TOC and highlights the entry that matches. So something's just not working from the TOC side.
    Any ideas?
    I'm using RH 9.02.271
    Windows 7 64-bit
    HtmlHelp output (chm)
    Thanks!

    Jared
    Right now I simply don't have the bandwidth to say "send me your project". You may see me ask others to do so but that will only be where I believe it will be simple or I just need to see something.
    Take a look at Item 13 in http://www.grainge.org/pages/authoring/rh9/using_rh9.htm. That covers the fix to the merged CHM help problem that was used before Adobe fixed it in 902. Part of the problem was the HHP getting rewritten so maybe something there will help.
    Any merged CHM help users able to pitch in here?
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • Open Edit form directly when list item is clicked in Sharepoint 2013 list

    Hi,
    I have a list web part, wherein the user clicks the item it should open in the Edit form directly. various forum i checked was for SharePoint 2010, as we do not have design mode in SharePoint designer 2013, I am unable to do.. I know
    if I the change the form type from default page to edit page, it will work, but not sure about how to go ahead. Could anyone help me to achieve this please....

    Sunitha,
    You can do this with some jQuery and JavaScript.  Look at this post:
    http://brandonatkinson.blogspot.com/2013/11/open-sharepoint-2013-list-items.html
    Basically, add a Script Editor Web Part to the page and include this snippet:
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
    <script type="text/javascript">
    $(function() {
    // Change all display form links to edit form links
    $('.ms-vb a[href*="listform.aspx"]').each(function(){
    var link = $(this).attr('href');
    link = link.replace("PageType=4", "PageType=6");
    $(this).attr('href', link);
    </script>
    Brandon Atkinson
    Blog: http://brandonatkinson.blogspot.com

  • Problem in launching a url when UWL Item is clicked

    Hi,
    I am developing a custom UWL connector which will fetch items from 3rd party system. Whenever I clicked on any of the item in the task list, It should open a url (value fetched from 3rd system which is dynamic).
    I tried putting the action tag in uwl_xxxconfiguration.xml with
    Action name="showDetails" handler="UrlLauncher" launchInNewWindow="yes">
          <Properties>               
                <Property name="url" value="${item.executionUrl}"/>
          </Properties>
    <Descriptions default="Show Details"/>
    </Action>
    before that I am setting the executionUrl value in uwlItem.setExecutionUrl("www.google.com") in getItems methods.
    After configuring the connector to the portal, when I click on the items, it is launching the details view of the item rather than google. Please help me on this issue.
    Thanks,
    Gobi

    Found the workaround in .xml only by removing the action of DefaultAction and incorporated my action for different tasks. Here is the code snippet for xml
    <ItemType name="uwl.task.mytask" connector="TestUWLConnector" defaultView="DefaultView" defaultAction="launchApp" executionMode="default">
          <Actions>
            <Action name="launchApp" groupAction="" handler="UrlLauncher" returnToDetailViewAllowed="yes" launchInNewWindow="yes">
              <Properties>
                <Property name="url" value="${item.executionUrl}"/>
              </Properties>
              <Descriptions default="Go To Application"/>
            </Action>
          </Actions>
        </ItemType>
        <ItemType name="uwl" connector="WebFlowConnector" defaultView="DefaultView" defaultAction="viewDetail" executionMode="default">
          <Actions>
            <Action reference="viewDetail"/>
            <Action reference="viewMemos"/>
            <Action reference="viewPreviewDetail"/>
            <Action reference="viewSimilar"/>
            <Action reference="uwlReturnToTable"/>
            <Action reference="markAsRead"/>
            <Action reference="markAsLaunched"/>
            <Action reference="connectionstatus"/>
          </Actions>
        </ItemType>
    Edited by: Gobinath Kasimayan on Sep 5, 2008 9:30 AM

  • When Querying items it goes in working and does not open form

    We have R 12.1.1 and 11.1.0.7 on redhat 5.3 ( all 64 bit , seperate apps and db node installation)
    Today when users query items , the form goes in working and it does not open.
    Please tell me where to check and what to see to resolve this issue .
    please reply
    Regards

    I open oracle application R12 Dashboard from front end. I restart services on apps node and db node.
    This querying items issue is resolved but Concurrent processing , admin , forms , web tabs have cross signs on dashboard.What is the issue with CM/Admin/Forms/Web? Please elaborate more.
    even i restart all the services then these cross signs should be ok.Do you mean the application is working as expected but those components status show as down from OAM? If yes, please see these docs.
    OAM: Web Components Status: Shows Down Even When The System Works Fine [ID 419823.1]
    Web Components Status in OAM Shows All Down Even When the System Works Fine [ID 309271.1]
    OAM Reports 'Internal Concurrent Manager Found Node To Be Down.' When Node is Up. [ID 405375.1]
    Thanks,
    Hussein

  • How to capture when a button and menu item clicked by user?

    Hi,
         I am working in Acrobat 8 professional.
         I want to capture when Comments->Publish comments is clicked by user.
         My requirement is when Publish comments menu item is clicked then one alert have to be displayed.
         Similarly when user clicks Publish comments button then also one alert have to be displayed.
         How can i do this?
         Thanks in advance...

    There is nothing in the Acrobat SDK to really help you.  Your best bet it to use OS-level hooking functions.

  • Problem when trying to add a link to the left menu item!!!!

    Hi everyone,
    I am trying to put a new menu group on the left menu,with a link in that group for every one.On checking with the customization guide this is what i did
    for one link i did add the following lines in each of the files
    1)xlWebAdmin.properties
    - menuGroup.Misc-Menu=Misc Menu
    - menuItem.Misc-Menu.My-Nomination=My Nomination
    2) xlDefaultAdmin.properties
    - menuItem.Misc-Menu.My-Nomination.link=mynomineefrm?showfrm
    3) repacked the war and the ear
    4) Restarted my server
    When I login into the administration(xelsysadm) page I didnt see any menu item with name "My Nomination" which i am supposed to see.
    secondly it shows the menu item when ever i select some group and click on assign menu item.
    Moreover, when I try to assign this menu item to all users group it gives me this error
    On browser it prints
    Permission Denied to Assign Selected Menu Items
    You do not have the permissions to assign one or more selected menu items.
    on console it prints
    ERROR [SERVER] Class/Method: tcDataObj/eventPreInsert Error :Insert
    permission is denied
    ERROR [APIS] Class/Method: tcGroupOperationsBean/addMenuItems encou
    nter some problems: maoRejections:You do not have permission to insert this obje
    ct.
    ERROR [APIS] Class/Method: tcGroupOperationsBean/addMenuItems encou
    nter some problems: Error occurred while adding menu items.
    ERROR [WEBAPP] Class/Method: UserGroupMenuItemsAction/commitGroupAs
    signMenuItems encounter some problems: {1}
    Thor.API.Exceptions.tcBulkException
    This problem eat my happy sunday :-(, any one has solution for this problem?
    - Also if some one can help on how to link jsp to the new link will be helpful for me!
    Thanks,
    doki

    Design Console > Form Information > add new
    Class Name Organizations.Merge
    Description Move users from one organization to another
    Type menuitem
    Add following to xlWebAdmin.properties, xlWebAdmin_en_US.properties
    Organizations.Merge=mergeOrgs.do?Display
    menuItem.Organizations.Merge.link=mergeOrgs.do?MergeOrganizations
    menuItem.Organizations.Merge=Merge
    mergeOrgs.button.display=Merge Organizations
    Even you have to assign first to System Administrator group
    First go to Manage Group
    Select System Administrator Group
    Select Menu Item
    Click Assign and select newly craeted Menu Item and click Confirm
    These are the steps to see the new menu item. To make this menu item working:
    you'll have to write action class, form bean class and you'll have to create JSPs and make their entry in struts-config as welll as in Tiles-def.xml
    Then your menu item will work.

  • Blank context menu items

    Hi all.
    I have blank context menu items (I think thats what they are called) when I right click on something - related to Adobe
    Any ideas on what gives?
    Running windows 8.1 pro and CS6.

    Hi.
    Yes I have tried repairing. It is Acrobat X Pro - version 10.1.10

  • Open UI - Google Chrome Issue - Menu Items jump

    Hello,
    We have upgraded to Open UI successfully. However we have observed an issue with google chrome only.  Menu items are jumping when menu items clicked in applet.
    Below are steps we followed for replication
    1. Navigate to Account summary view by drilling down on any account hyperlink in account list view
    2. Click the Menu button in the lowermost applet in the view
    3. The menu opens way on the top
    Please can you suggest a work-around/solution in this scenario?
    Regards,

    Hi,
    Does it happen when the chrome browser is maximized?
    Do you have any additional toolbars or extensions installed on chrome? If yes check if disabling/uninstalling them make any difference.
    Hope it helps,
    Wilson

Maybe you are looking for

  • Report with unpaid invoices

    Hello i need report that show invoices which was truly unpaid longer than  60 days. I'm new in sql in Sap and this sql dont work good for me ;/ SAP Business One 8.82 (8.82.071) SELECT T2.[CardCode], T2.[CardName], T1.[DocDueDate], T2.[DocDate]  FROM

  • How can I move photos in iPhoto from the WEB Photo Stream or WEB Facebook to one of my Events?

    How can I move photos in iPhoto from the WEB Photo Stream or WEB Facebook to one of my Events?

  • New Hard Drive, is there a risk?

    Hello, I just replaced the hard drive in my 2009 Mac Book Pro.  The stock hard drive had some kind of safety feature where if I moved the notebook suddenly, the drive would make a audible sound as it parked the drive head for safety reasons.   Now wi

  • Issue with Line item in PO

    Hi, I need to pass item number say "3" while creating PO using BAPI_PO_CREATE1 but always that takes LINE ITEM as 1. Is there any solution for passing my item number to this field. Thanks Sudharshan

  • How do I turn off the trackpad when using a mouse?

    Often, while using a mouse on my MacBook Air, the cursor will jump to a strange location, thus I am typing in an inappropriate place causing confusion as to where I am in an email, document, or other application. Is there a way to stop this from happ