UI API emulate click on MessageBox

Dear expert,
  When the end user change the quantity field in order recommedation report(MRP).  The message box is shown. Now, i want to use use UI API to emulate the click action and answer this message box.  How could i do that??  I tried and checked the doc, the user data source can only use in user added matrix. So in this case ,i cannot use user data source.
Regards,
Kit

Dear lbai,
  Could u give me more example?? i have implemented the following code. But, it makes the UI server down.
ElseIf pVal.FormType = 0 Then
Try
     Debug.WriteLine("Form UID: " & FormUID)
  If SBO_Application.Forms.ActiveForm.Type = 65217 _
      And Not pVal.BeforeAction Then
     Dim box As SAPbouiCOM.Form
     box = SBO_Application.Forms.Item(FormUID)
      If Not box Is Nothing Then
         Debug.WriteLine("Got Box")
      Else
         Debug.WriteLine("Fail To Get")
      End If
   Debug.WriteLine("Box Item Count: " & box.Items.Count)
   ' Click default button  
   box.Items.Item("1").Click()
End If
   Catch ex As Exception
        Debug.WriteLine(ex.Message)
    End Try
End If

Similar Messages

  • UI API issue, clicking base document on sales order does not set ActiveForm

    I have a sales order window open with a sales order loaded.  When I right click and click on base document, the sales quotation window shows up properly, however in code when I get the ActiveForm, it is the sales order form and not the sales quotation form!
    Private Sub SBO_Application_FormDataEvent(ByRef BusinessObjectInfo As SAPbouiCOM.BusinessObjectInfo, ByRef BubbleEvent As Boolean) Handles SBO_Application.FormDataEvent
        If BusinessObjectInfo.Type = bo_type.SALES_QUOTATION And BusinessObjectInfo.BeforeAction = False And    BusinessObjectInfo.EventType = BoEventTypes.et_FORM_DATA_LOAD
            SBO_Application.MessageBox(SBO_Application.Forms.ActiveForm.Type) 'shows 139 instead of 149?
        End If
    End Sub
    If quotation data is loaded using the next/prev/first/last buttons on the menu bar, the activeform .Type is 149.
    If quotation data is laoded using the Base Document shortcut on the sales order, the activeform.Type is 139.
    Is that suppose to be correct?  If so, how do I get the new sales quotation form that is created by using the base document shortcut?
    Edited by: Dung Nguyen on Aug 24, 2011 2:12 AM

    János Nagy wrote:
    Hi Dung,
    >
    > Formdataevent is handling trhe data events, not GUI events. In form data load means that the form is data is loaded, not that the form is activated.
    >
    > You must handle menuevent, and in menuevent before_action = false case the active form will be the sales quotation (or child/parent in the document flow).
    >
    > You may use an SDN tool to determine the events. You can download it from:
    > http://www.sdn.sap.com/irj/scn/businessone-tools
    >
    >
    > Regards
    >
    > János
    The problem with form activated is that it is triggered everytime the window is "activated'.  Meaning that if a user clicks out of the form and clicks back in, the form activated event is triggered.
    I need to perform an operation only on the first time the form and data is loaded and/or activated.

  • UI API URGENT: Click on cell in matrix doesn't work in SBO 2005

    Hi all,
    I've detected very strange problem. We have developed some addons for SBO2004A in SDK2004. There we used CLICK function on matrix cell, where the whole form was freezed, f.e. Purchase Order:
    oForm.Freeze True
    Set oMatrix = oForm.Items("38").Specific
    For i = 1 to oMatrix.RowCount
    oMatrix.Columns("1").Cells(i).Specific.String = sItemCode
    oMatrix.Columns("1").Cells(i+1).Click ct_Regular
    oApplication.ActivateMenuItem ("1292")
    Next i
    oForm.Freeze False
    If the form is freezed, the application in SBO2005 doesn't react on
    oMatrix.Columns("1").Cells(i+1).Click ct_Regular
    , although this worked in SBO2004 without any problems. The Click event is not filtered for this form and in Event_Filter the pVal.BeforeAction property is TRUE.
    Then I found, that if form isn't freezed, the CLICK on matrix cell function works.
    Is there any workaround, how to solve this problem without reprogramming a lot of code and to prevent flickering on form, when it is not freezed?
    I work with SBO 2005A SP01 PL07.
    Many thanks in advance.
    Kind regards
    Libor.
    Is there

    Hi Frank,
    I created message to SAP Support with this issue on Wednesday the 16th with priority high. The first solution from SAP Support was to disable freezing on forms, while they are processed. But for the performance reasons this is not possible. The reasons for clicking while freezed are relative simple and there are some of them:
    1) In some system forms that are filled by user we need to append special items between other items already existing in form. The many of fields (price fields) for all items in matrix have to be recalculated. For this we use freezing on form, then we search for related item, simulate click on row, and call
    Application.ActivateMenuItem ("1292")
    which calls Add Row [Ctrl+I] system function, then in newly created row we append our data, the prices for related item will be recalculated atc.
    2) we developed automatic calculations in documents, which uses VALIDATE event_type. That means if value in some field in matrix is changed, the values in other fields are recalculated. In some cases we needed to use CLICK too.
    I believe, there is possibility how to replace this 'on CLICK based' functionality...but then we need to rebuid many of our projects.
    Even I don't know, if this issue is bug in SBO2005 - UI API or it has some reason, but I suppose, this worked in all previous SBO SDK versions (since 6.5).
    Any ideas?
    Thanks.
    Kind regards
    Libor.

  • How to emulate clicking with keyboard

    Is there a way to use keyboard to issue a click at the current mouse location?

    System Preferences>Universal Access>Mouse and Trackpad: turn 'Mouse Keys' on. This turns your numeric keypad into keys to move and click the mouse (5 is click) - please see this page for details:"
    http://docs.info.apple.com/article.html?path=Mac/10.5/en/cdb_moskys.html
    Of course if you do this you can't use the numeric keypad to enter numbers (and if you have one of the small keyboards you'll need a separate numeric keypad).

  • I want API listing for 11.5.10 release.

    Hi,
    I want list of all API's of all Modules. If anybody guide me from where i get it, it is helpful to me.
    Thanx in advance

    I need API for CRM custom, address etc. thsi is the
    first time am going for API
    where can i find detail doc and API s,Check the same link posted above.
    What are TCA s?AFAIK, TCA stands for Trading Community Architecture. Do some search on Metalink, search for "TCA API" then click on "Oracle Trading Community", you would get many notes talking about the subject.
    Note: 230753.1 - Different uses of TCA API
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=230753.1

  • Simple problem with popup message before adding document on system form

    Hi all,
    We have an AddOn that validates price lines on system Sales Order form matrix, so that if prices fall below a certain value, a popup is show to ask to continue or not, when user presses ADD button.
    The problem is that if he chooses yes (to continue), the Sales Order is not added since the button ADD keeps being selected ....
    Here is my code:
            [B1Listener(BoEventTypes.et_CLICK, true)]
            public virtual bool OnBeforeClick(ItemEvent pVal)
                int iResult = B1Connections.theAppl.MessageBox("Price lines fall bellow minimum! Continue?", 1, "NO", "YES", "");
                if (iResult == 1) // NO
                    // Show error
                    B1Connections.theAppl.StatusBar.SetText("OK", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
                    return false;
                // YES: Continue to add Sales Order
                return true;
    The problem is somehow related with the popup message being shown: if user says YES to continue, the system form does not continue with the standard process of adding the Sales Order (when I move the cursor above the ADD button is shows it already pressed...).
    Do I have to do anything more to force the process to continue, when the user says YES?
    Regards,
    Manuel Dias

    Thtas known problem. The solution for this is declare global variable as boolean, when user selects Yes, then set this variable to true and emulate click to add button again where before the message box check if its varaible sets to true - in this case dont show message box, only set variable to false.
    The concept of code will be
    dim continue as boolean = false
    in item event
    if continue = false then
        x = messagebox...
      if x = 1 then
        continue = true
         items.item("1").click
    end if
    else
    continue = false
    end if

  • How efective set price to purchase order

    I have created purchase order with 600 lines where isnt set price for each item.
    Now I want through UI API set the correct price to each price cell in row based on width and height of item. Now Im going through all lines in matrix, get dimensions, calculate the price, click on the specific cell with blank price in matrix and through SendKeys Im sending the price - till now its everything ok.
    The problem is, when I go on next line and emulate click to next cell, the sap calculates the total price and when is there hundreds of items in order, its too slow. When is there less items, its acceptable, but for hundreds of records isnt useable.
    So my question is:
    Is there any possibility how to set that sap will not recalculate the total and after setting each price call some function, which will the total price correctly recalculate?
    or
    Is there any other way how to set price with UI (because user want to check it before upodate) which is quicker?
    Thanks a lot for suggestions

    Hi Petr,
    The UI unfortunately is always going to be really slow for this type of update. If the user needs to see the values, I think I'd create a separate screen that shows only the PO header and line fields that you need to show to the user for updating pricing. Because it's a user form you've got more control on what gets triggered when the user tabs out of a field. You can then use the DI API to update the PO when the user clicks on Update.
    Is there any scope to break the PO down to a number of smaller POs? I always recommend to my clients to keep the number of rows below 100 and preferably below 50 because performance can really degrade after that.
    Kind Regards,
    Owen

  • Pre populate adapter in OIM 11gr2 not triggered in database

    Hello,
    Folowing is the steps for creation of pre populated adapter in OIM
    ** we have created one form in OIM which is provisioned to Database**
    Steps
    · Installed GTC connector for Database Web App 9.*
    · Created new user and Table in Database
    · Created IT resource for Database
    · Created Sandbox, App Instance and Form, published sandbox
    · Started catalog synchronization job scheduler
    · Created user and and request account to app instance.
    * select application instance to catalog and checkout.
    ** we have created adapter as per the following link
    http://idmrockstar.com/blog/2009/08/how-to-create-a-prepopulate-adapter-in-oim/
    create a pre populated adapter that will populate the firstname of user in email using java class
    source code:
    public class AdapterClass{
    public String email( String fname )
    return fname;
    Steps:
    1) In the design console I have open the Adapter Factory and create a new adapter name :firstname
    adapter type: pre-populate rule generator
    click on save
    2) select variable list tab:
    variable name:Firstname
    type:String
    Map to : Resolve at runtime
    click on save
    3) select Adapter Task tab
    * click add and select logical task
    * select SET VARIABLE and click continue
    * Operand Type:variable
    * Operand Qualifier : FIrstname
    click save and save the adapter
    4) compile the java class into jar file and move the jar file into OIM_HOME\server\JavaTasks
    5)Create a new Adapter with the following"
    Adapter name:Email
    Adapter type: Pre-populate rule Generator
    click save
    6) select variable list tab:
    variable name: var1
    Type:String
    Map to:Resolve at runtime and click save
    7) select Functional Task tab:"
    select java click continue
    select the following information:
    Task name:email
    Api source: JavataskJar:Adapterclass.jar( the jar file which you have create)
    application api: adapteclass
    click save
    8) In the Application method parameters,select the first input: String
    Cange Map to:Adapter variables
    Set the name to:var1 and click save
    9) select the output:STring
    change map to:Adapter variables
    set name to: return variable
    10) click save and save the adapter and click on Build
    Adapter is now build the next step isto join it to the form
    ** join the adapter to the form**
    Steps:
    1) click on form designer and search the related form which we have created
    2) In the respective form click on create a new version and create a new version
    3) and then click on Pre populate tab and click on ADD
    4)select adapter field to firstname
    Rule : default
    Adapter : Firstname
    and click on save
    5) In the adapter variable field click on firstname and fill the following
    map to: Process data
    Qualifier : firstname
    6) Repeat steps 3 to 5 to map the email adapter
    7) click on save.
    Now we have done with all the steps and now we have created one User submit the user
    we have click on request acounts ---> search the catalog and select the application instance (select the app instance "database provisioning") ---> add to cart ---> and check out ---> fill the form leaving email field --> ready to submit ---> submit
    now we have check this user in database but still pre populated fields are not reflected. since this not working so we have found the other three links
    Re: OIM 11gR2 - Prepopulate Field Empty Problem
    http://fusionsecurity.blogspot.in/2013/01/populating-request-attributes-in-oim.html
    http://identityandaccessmanager.blogspot.in/2011/07/prepopulate-adapter-in-oim-11g.html
    according to these links they mention to implements the prepopulationadapter interface into the java class and create the plugin.xml for the class which we have used in jar.
    so we prepared a plugin.xml
    <?xml version="1.0" encoding="UTF-8" ?>
    <oimplugins xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <plugins pluginpoint="oracle.iam.request.plugins.PrePopulationAdapter">
    <plugin pluginclass= "com.oracle.demo.iam.prepop.plugin.UserLoginPrePop" version="1.0" name="UserLoginPrePop">
    <metadata name="PrePopulationAdapater">
    <value> My_users::email</value>
    </metadata>
    </plugin>
    </plugins>
    </oimplugins>
    and the java class which implements "PrePopulationAdapter".
    they mention to put that jar into one directory named "lib"and paste the xml and lib folder into the OIM_HOME\server\plugin
    BUt we stuck on how to configure the adapter or what is the next steps for the above process. or there is something that we have missed in the process
    please do reply its urgent
    Regards,
    Tushar Palekar

    hii i have followed all your steps regarding the pre populated adapter ,but no luck.
    java code :
    package com.oracle.demo.iam.prepop.plugin;
    import java.io.Serializable;
    import oracle.iam.request.plugins.PrePopulationAdapter;
    import oracle.iam.request.vo.RequestData;
    public class Userfname implements PrePopulationAdapter {
    public Serializable prepopulate(RequestData requestData){
    String fname = "xyz";
    System.out.println("Returning fname ==== " + fname );
    return fname ;
    2)i have create a jar for this code and paste it into lib folder.
    3) i have create a plugin.xml
    <?xml version="1.0" encoding="UTF-8" ?>
    <oimplugins xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <*plugins pluginpoint="oracle.iam.request.plugins.PrePopulationAdapter">*
    *<plugin pluginclass= "com.oracle.demo.iam.prepop.plugin.Userfname" version="1.0" name="Userfname">*
    *<metadata name="PrePopulationAdapater">*
    *<value>register::LAST_NAME</value>*
    *</metadata>*
    *</plugin>*
    *</plugins>*
    *</oimplugins>*
    4)i register the plugin using ant -f  pluginregistration.xml register
    5)i have restartthe oim server and then i create a user using the same app instatnce in which i have create the form(ie.register),and
    request acount-->select app instance ---> add to cart
    but the last name xyz as per the java code is not reflected in the dadbase table.
    please help
    tushar palekar

  • Remove lines in Outgoing Payments

    Hi,
        I'm trying to remove all the lines i add into the "Payment Means" any time that y return no load this screen...before creating the payment.
    is there an object to do this??? or i have to do this removing item by item navigating from the all the pane of the Payment Means form???

    Hi Mariano,
    Since you have not added the payment,
    Options :
    1. Browse through each pane and clear the data. (the one you mentioned)
    2. If you havent add the payment means, emulate click on the cancel button and reopen the form.
    Regards
    Edy

  • Question about j2me bluetooth lack of documentation!

    I don't know if I am searching in the wrong places. I am coding a simple (at least for now) java application that communicates through bluetooth.
    I have been using the j2me api available at http://java.sun.com/javame/reference/apis/jsr082/
    But it lacks all sort of information! The API is there... the class and methods are there but nothing is explained....
    For example, if you follow the link above to the api, then click in the DiscoveryAgent, then go to the definition of the method searchServices, this is what it tells you:
    public int searchServices(int[] attrSet, UUID[] uuidSet, RemoteDevice btDev, DiscoveryListener discListener) throws BluetoothStateException
    I can see the declaration, I even deduce what each argument is supposed to be, but..... attrSet???? what is this.... there is a complete lack of information on everything, I find myself googling for everything and finding magic numbers that sometimes make things work. Is there any online resources for bluetooth j2me programming?
    By the way... this thing about the attrSet is my latest doubt... if you know what values can be used in there please let me know:)
    But my problem is not about this particular method... is about all of the documentation.
    If anyone can point me into some place where a good specification can be found i would much appreciate it

    http://www.jcp.org/aboutJava/communityprocess/final/jsr082/
    found this :) I think it's the answer to my problems.

  • Hiding Applet Window

    Hi there!
    I need help on hiding applet window.
    I have tried using hide() method but the compiler gives deprecated warnings and ask me to refer to documentation but I dont know how to use it.
    Does anyone knows how to hide/minimise or whatever so that I can make it "invisible" to the user?
    Thanks in advance.

    On the left hand side of this page under Documentation is APIs. Click on that. When you get to the next page, choose a version of java (if you dont know, choose J2SE 1.4.2 API Specification).
    On the left of that page, under All Classes, scroll down till you see JApplet. Click on it.
    In the right hand pane, scroll down till you see the Method Summary section. Look for hide(). It's not there!
    Scroll down further and look in each Methods inherited from class... section. You will find hide under java.awt.Component. Click on it. This will bring you to the page for Component.
    In the right hand pane, scroll down till you see the Method Summary section. Look for hide(). Bingo!

  • Tab Pages in OAF .pleas help urgent !!!!!!!!!!!!!!!!!!!!!!!!!!

    Hi,
    I have a requirement in my project, where in i select a customer from a list of values and tehn click the go button.
    this will list the records in a subtab layout which has a table layout in which the valeus are displayed.user can edit existing record or create a new record.i will be using an oracle api when clicked on save button to save the changes in the base tables.
    my queries:
    if i click on add: a new row should be added to the table.i would like to know how can this be done.
    if i click on save: i should be able to know , i am in which tab so that i can pass the appropriate values to the api.
    i would like to the tab region name.
    please do help me.its urgent !!!!!!!!!!!!!!!
    thanks
    Ramya

    Ramya,
    Go the ADD Rows section in Advance table topic in the developer guide -- for adding new row in the table.
    to know the tab -- use oapagecontext.getFunctionId()
    thanks,
    Kumar

  • Creating Deskband for Windows 8 using C++ and its communication with C++/Qt application

    I've already found described way of creating deskbands here -- http://msdn.microsoft.com/en-us/library/windows/desktop/cc144099%28v=vs.85%29.aspx and respective sources on SDK like https://github.com/theonlylawislove/WindowsSDK7-Samples/tree/e8fe83b043727e71f5179da11fc6228475e7973c/winui/shell/shellextensibility/deskbands
    But can't find any simple and straight article on how to use it for example in/from Qt-written application.
    Can someone recommend any resource where I can find way to implement own deskband for own application, please.
    Thanks.

    There is no API for creating or showing menus on desk bands written by others, with the exception that a task bar button representing an application
    written by yourself, in that case you can use the Windows 7 Jump lists API (right click menu) or WM_SYSCOMMAND (shift+right click menu) to control the context menu of your own application. How other
    deskbands handle menus are completely up to their authors. 
    A deskband is an in-process COM server which means you must build a 64 bit version if you want to use it in 64 bit Windows Explorer.
    Visual C++ MVP

  • Disabled Copy & Paste in 29.01 is like losing an arm!! Need do-able workaround ASAP.

    I am beyond furious that all the workarounds that made copy and paste function have now been disabled in 29.0.1. The FF overlords are imposing their will on the masses. I am an adult and can make security decisions for myself. Losing cut & paste is like losing an arm. Before I switch another browser, does anyone know a workaround to restore this critical browser function? I have seen the javascript idea but it's a bit complicated. The Clipboard Helper plugin and altering configuration no longer work. No add-on works either. I am desperate for an uncomplicated fix. Anybody?!

    You should still be able to use the keyboard shortcuts (Ctrl+V, Ctrl+C, and Ctrl+X) to paste, copy and cut.
    As for web sites performing clipboard operations, see
    * https://developer.mozilla.org/docs/Web/API/ClipboardEvent
    If you absolutely have to, you can downgrade to Firefox ESR until this is resolved.
    * http://www.mozilla.org/firefox/organizations/faq/
    ''Feel free to vote for reports to keep track of any progress, but please don't post comments unless you have technical information to add. See [https://bugzilla.mozilla.org/page.cgi?id=etiquette.html the Bugzilla etiquette page] for details.''
    * [https://bugzilla.mozilla.org/show_bug.cgi?id=913734 Bug 913734] - Remove domain policy goop from CAPS
    * [https://bugzilla.mozilla.org/show_bug.cgi?id=1004260 Bug 1004260] - Firefox 29 broke clipboard access; restore the CAPS allowclipboard policy until the Clipboard API allows click-to-copy
    * [https://bugzilla.mozilla.org/show_bug.cgi?id=1012662 Bug 1012662] - implement click-to-copy and click-to-cut permissions (semi-trusted events)
    * [https://bugzilla.mozilla.org/show_bug.cgi?id=1013165 Bug 1013165] - Add "allow clipboard access" preference to about:permissions

  • Re:Adding a row in a matrix using Lost_Focus event & deleting a row

    Dear All,
    Iam facing a problem in adding a row in a matrix using last focus event.its like if i keep the cusor in the last coloumn in a matrix n if i press tab it should add a row .the row is getting added the problem here is the cursor is gng to first row but it should come to the second row.
    the second problem is while deleting a row the row is getting deleted but the row count is showing the deleted row no.
    pls suggest a solution for these problems.
    Thanks & Regards
    Anand

    Hi,
    If pVal.BeforeAction = False Then
                Select Case pVal.EventType
                    Case SAPbouiCOM.BoEventTypes.et_KEY_DOWN
                        If pVal.ItemUID = "matlab" And pVal.ColUID = "mtimeout" And pVal.CharPressed = 9 Then
                            oMatrix = oForm.Items.Item("matlab").Specific
                            Dim rc As Integer = oMatrix.VisualRowCount
                            If rc = pVal.Row Then
                                addrow()    'funtion for adding row
                                oMatrix.Columns.Item("labc").Cells.Item(oMatrix.RowCount).Click()
                                'SBO_Application.MessageBox(oMatrix.RowCount)
                            End If
                        End If
    This is the function i hav used
    Private Sub addrow()
            Try
                If (oForm.UniqueID = "updt") Then
                    oForm = SBO_Application.Forms.ActiveForm
                    oForm = SBO_Application.Forms.Item("updt")
                    omatrix = oForm.Items.Item("matlab").Specific
                    omatrix.AddRow(1, omatrix.VisualRowCount)
                    Dim rc As Integer = omatrix.VisualRowCount
                    'SBO_Application.MessageBox(rc)
                    otext1 = omatrix.Columns.Item("mdatein").Cells.Item(rc).Specific
                    otext1.String = "s" 'RecSet.Fields.Item("date1").Value
                    otext1 = omatrix.Columns.Item("mdateout").Cells.Item(rc).Specific
                    otext1.String = "s" 'RecSet.Fields.Item("date1").Value
                    End If
            Catch ex As Exception
                SBO_Application.MessageBox(ex.Message)
            End Try
        End Sub
    this is the code which m using
    Regards,
    Anand

Maybe you are looking for

  • Working-Frame is empty

    Hello, I have a little problem with a JFrame. I have a function wich sends a Query to a Database. The result is displayed in a table. When this function works I want to display a frame with an animated gif wich shows, that the programm is still runni

  • Finder Crashing after update

    Hey Guys I have an old Macbook (2009) runing 10.6.8 that I recently ran some software updates on it and now everytime I try to open the utilities folder finder locks up and then closes and restart. The mac is bogged down, and adding more ram doesnt m

  • Photos disappear

    I purchased some photos from Shutterstock and saved as png. My photos were there, then disappeared. It still appears in the timeline and when I select the item in the timeline, it gives the dashed lined box where my image used to be. After publishing

  • Need to change payment info for student CC membership, but it says I have a "free" membership when I go to change it?

    I recently changed my card info, and need to change it on my Creative Cloud membership. When I go to Manage Account, it tells me I have a free membership. I don't understand why, as the Adobe Applications Manager tells me I have 4 days left to update

  • Bulk exception error

    Hi All, my procedure is like this ... CREATE OR REPLACE PROCEDURE nested_proc IS CURSOR cur_TEMPVARRAY IS SELECT * FROM TEMPVARRAY; TYPE typ_TEMPVARRAY IS TABLE OF cur_TEMPVARRAY%ROWTYPE; r_TEMPVARRAY typ_TEMPVARRAY; --v_TEMPVARRAY TEMPVARRAY%rowtype