Focus when setting value in system matrix

Hi All,
Starting from SAP Business One 8.8 SAP changed the behaviour of the matrix focus.
Previously, after you set a value in a system matrix with the UI API, the focus was automatically restored to the item that previously had the focus. In 8.8, the focus remains on the matrix cell.
We're currently facing different issues with addons which were working in the past as this is a change of behaviour.
I would like to know from other forum users what they think about this change of behaviour, is it good, not good?, ...
Thank You,
paolo

Hi Paolo,
I ran in to this issue on a number of my addons which caused me a lot of extra work. Personally I thought it was a weird change to make as I would rarely (if ever) want to automatically set focus to a cell in a matrix when the value is changed through code. Typically my addon might be setting 3 or more values in a row (based on data that the user selects) and, after the change to the UI API, the screen flickers badly and the focus ends up on the final cell that was updated which can make data entry awkward (especially as Form Settings allows any user to change the order of the columns). In the end I had to freeze the form during my updates and then call the Click method on the cell where I wanted focus to remain.
I did raise this with SAP support and they said it was a deliberate design change. Hopefully they will change it again so that the developer can pass in a parameter or something to control where the focus is placed after the update.
Kind Regards,
Owen

Similar Messages

  • Set value to system matrix (38) cell

    Hello,
    Thanks for your reply.
    I need to set value for some UDF on a system matrix (38). Crurrently ,I use following code:
    public void SetValue(string columnUniqueId, int matrixRowIndex, string value);
    (I'm using the coresuite framwork)
    The coresponding way in SDK would be:
    oMatrix.Columns.Item("columnUniqueId").Cells.Item("matrixRowIndex").Specific.value = "value"
    This works but when I have more than 10 UDF to fill together, the performance is bad. It takes nearly 3-4 seconds to load one item(row).
    Is there any fast way to set the value? Or is there any other suggestion how to do it?

    No, the problem is not by loading of UDFs by a existing document.
    But when you create a new document and you add a new postion to the document by choosing an item. Then our AddOn copies the UDF values from the item master data into the corresponding UDFs in the postion. At this moment I have to write them manually.
    The best would be when the UDFs in the Item Master Data would be autiomatically created also  in the postion of documents. Because in this way they would be automatically loaded by SBO itself.
    I think SBO has a mistake in its design by here.

  • Set value of System Matrix Form using SDK

    Is is possible to set matrix value using SDK of user defined form. Plz forward code for same.

    Yes it is possible. You need to get the form and into the form the item, cast it to a matrix and then set the values into it.
    There is plenty of samples you can use to learn about UI API. You can download them directly from SDN.

  • Is there any way to put the values inthe system matrix which is non editabl

    is there any way to put the values inthe system matrix which is non editable...
    this Q is not that much priority since i had achieved the requirement other way round by having user defined matrix ... but if i get the way for this it will help my add on performance much better...

    Hi Raj, I didnt get all the details but here some ideas how you can solve your issue:
    Depending in the system form you are working you can always use a DBDataSource in order to manipulate the rows in a matrix. It's much better as using the objects of the matrix itself. In this case you can use:
    oMatrix.FlushToDataSource()
    oDBDsource.SetValue("U_Quan", pVal.Row, "101")
    oMatrix.Clear()
    oMatrix.LoadFromDataSource()
    As you can see in SetValue i'm obtaining the Column, then the row number and then setting a NEW value for this cell.
    Please consider if you can use DBDataSource instead of UserDataSource.
    If the answer is yes then you can use the following:
    oMatrix.FlushToDataSource()
    '//Get the line you want
    matrix.GetLineData(pval.row)
    '//Call the Userdatasource assigned to that column
    UserDataSource = UserDataSources.Item("ItmCode")
    '//Set the new value
    m_UserDS.ValueEx = "A02520"
    oMatrix.LoadFromDataSource()
    You can also use:
    oMatrix.Columns.Item("ItemName").Cells.Item(l_rownum).Specific.String = "A02520"
    In case you are not assigning the string in a combobox of course.
    Good luck!
    Felipe

  • Changing focus when a value is selected in LOV

    Hi,
    I am JDeveloper 11.1.1.6.0.
    I have an LOV with auto-suggest. When the user types some characters and select some item in the list suggested, I want the focus to be on the next editable field.
    Is there any way of doing this without using Javascript?
    Thanks.

    Is there any way of doing this without using Javascript?
    Probably not.
    But maybe you can generate javascript on server side(in value change listener), similar to this: https://blogs.oracle.com/jdevotnharvest/entry/how_to_programmatically_set_focus
    Dario

  • Display pattern for DateTimeField ignored when setting value from script

    Hello,
    I have a DateTimeField with Data pattern date{DD.MM.YYYY} and Display pattern date{MMMM}, so it displays its default value "21.05.2011" as "May". Now I'm setting its value from the other field's initialize event:
    if (this.rawValue) {
        data.Subform_Footer2.DateTimeField1.rawValue = this.rawValue.match(/\d+\.\d+\.\d+/)[0];
    Assuming this.rawValue contains text "21.04.2011", the DateTimeField displays "21.04.2011" in preview instead of "April" as specified in Display pattern.

    Hi,
    To me it looks like you are passing a string to the date field, rather than a date.
    Instead of trying to abstract the month manually in the script, why not pass the whole date through "21.04.2011" and leave the display pattern display the month.
    Niall

  • Error when Setting value to Bind variable in View Link used in HGrid

    Hi
    I have requirement to pass profile id as bind variable, I have created a VO based on below Query.
    select 'N' Is_Selected, 'N' Is_Already_Selected, 'N' Is_Selected_Copy, a.*
    from XXPA_STATE_CONST_DTLS_V a, xxpa_state_const_dtls b
    where a.child_id = b.child_id(+)
    and b.profile_id(+) = :1
    View Link Query that is being generated is
    SELECT * FROM (select 'N' Is_Selected, 'N' Is_Already_Selected, 'N' Is_Selected_Copy, a.*
    from XXPA_STATE_CONST_DTLS_V a, xxpa_state_const_dtls b
    where a.child_id = b.child_id(+)
    and b.profile_id(+) = :1) QRSLT WHERE PARENT_ID = :Bind_ChildId
    it Shows Errors as
    ## Detail 0 ##
    java.sql.SQLException: Missing IN or OUT parameter at index:: 1
    could anyone tell what could be the wrong. Do we need to set bind variable in view link Explicitly? or any other alternative.
    Its very Urgent.
    Regards
    Vimal

    Hi,
    I have faced similar problem some time ago. I could not find any solution except removing bind parameters in where clause. I tried to change binding style but it also didn't work. I think the problem is caused by view link's where clause.

  • Error trying to run SSIS Package via SQL Server Agent: DTExec: Could not set \Package.Variables[User::VarObjectDataSet].Properties[Value] value to System.Object

    Situation:
    SSIS Package designed in SQL Server 2012 - SQL Server Data Tools
    Windows 7 - 64 bit.
    The package (32 bit) extracts data from a SQL Server db to an Excel Output file, via an OLE DB connection.
    It uses 3 package variables:
    *) SQLCommand (String) to specify the SQL Statement to be executed by the package
    Property path: \Package.Variables[User::ExcelOutputFile].Properties[Value]
    Value: f:\Output Data.xls
    *) EXCELOutputFIle (String) to specify path and filename of the Excel output file
    Property path: \Package.Variables[User::SQLCommand].Properties[Value]
    Value: select * from CartOrder
    *) VarObjectDataSet (Object) to hold the data returned by SQL Server)
    Property path: \Package.Variables[User::VarObjectDataSet].Properties[Value]
    Value: System.Object
    It consists out of 2 components:
    *) Execute SQL Task: executes the SQL Statement passed on via a package variable. The resultng rows are stored in the package variable VarObjectDataSet
    *) Script Task: creates the physical output file and iterates VarObjectDataSet to populate the Excel file.
    Outcome and issue:The package runs perfectly fine both in SQL Server Data Tools itself and in DTEXECUI.
    However, whenever I run it via SQL Server Agent (with 32 bit runtime option set), it returns the errror message below.
    This package contains 3 package variables but the error stating that a package variable can not be set, pops up for the VarObjectDataSet only.  This makes me wonder if it is uberhaupt possible to set the value of a package variable
    of type Object.
    Can anybody help me on this please ?
    Message
    Executed as user: NT Service\SQLSERVERAGENT. Microsoft (R) SQL Server Execute Package Utility  Version 11.0.2100.60 for 32-bit  Copyright (C) Microsoft Corporation. All rights reserved.    Started:  6:40:20 PM  DTExec: Could
    not set \Package.Variables[User::VarObjectDataSet].Properties[Value] value to System.Object.  Started:  6:40:20 PM  Finished: 6:40:21 PM  Elapsed:  0.281 seconds.  The package execution failed.  The step failed.
    Thank you very much in advance
    Jurgen

    Hi Visakh,
    thank you for your reply.
    So, judging by your reply, not all package variables used inside a package need to be set a value for when run in DTEXEC ?
    I already tried that but my package ended up in error (something to do with "... invocation ...." and that error is anything but clearly documented. Judging by the error message itself, it looks like it could be just about anything. that is why I asked my
    first question about the object type package variable.
    Now, I will remove it from the 'set values' list and try another go cracking the unclear error-message " ... invocation ...". Does an error message about " ... invocation ..." ring any bells, now that we are talking about it here ?
    Thx in advance
    Jurgen
    Yes exactly
    You need to set values only forthem which needs to be controlled from outside the package
    Any variable which gets its value through expression set inside package or through a query inside execute sql task/script task can be ignored from DTExec
    Ok I've seen the invocation error mostly inside script task. This may be because some error inside script written in script task. If it appeared after you removed the variable then it may because some reference of variable existing within script task.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • My laptop died last night and the date and time was set for 1/1/2000. I went to change the date and time and cannot. For some reason when i pull up system preferences it will not load date and time but will load other stuff. Please help.

    Last night my laptop died and the time and date was reset. I cannot acess date and time preferences to change it and my laptop is acting really weird. My CD drive is broken so there are no options to put in a cd. Please someone help i need my laptop for school and cannot afford another.

    Many system actions will misbehave, given an inaccurate date. Resetting the NVRAM and / or SMC will not fix it, and if the system has a preposterous date you may not be able to open System Preferences to correct it. This dilemma may or may not be addressed in a future OS X update.
    If you cannot open System Preferences you can reset your system date and time using Terminal.
    Please read everything that follows before proceeding. Write them down if necessary because the effects of setting a preposterous system date are unpredictable.
    Quit System Preferences, force quit if necessary: OS X: How to quit an unresponsive application using Force Quit
    Open Terminal - it is in your Utilities folder and looks like this
    You can find Terminal by using the Finder's Go menu and choosing Utilities, then double-click the Terminal icon.
    At the prompt, you will be typing a command resembling the following:
    sudo date mmddhhnnyyyy
    ... but you must substitute the actual date and time in the command that corresponds to the date format used for your location. In other words if your custom is to use a date like 8 February 2014 then reverse the mm and dd values.
    Substitute numerals in the above command according to the following:
    mm = month
    dd = date
    hh = hour (24 hour format)
    nn = minutes past the hour
    yyyy = year
    Each of those values must be two digits except for the year which can be two or four digits. As an example if the current date and time is February 8, 2014 at 9 PM your command will be the following:
    sudo date 020821002014
    or
    sudo date 0208210014
    Either one will work. If you enter nonsensical values the system will attempt to parse the entry correctly.
    To recover from your inability to use System Preferences to set the date and time, the value entered does not have to be precise, it just has to be approximate.
    Enter that command using the actual time and date for your location and in the appropriate format, then press the Return key. Terminal will ask for your Admin Password - the same one you use when you log in to your Mac. Type it and then press the Return key. What you type will not appear, not even with •••• characters.
    To determine if your change was effective just type the date command and press the Return key. Terminal will reply with the date and time. If it appears correct and in the correct format, you should be able to open System Preferences > Date & Time once again. Selecting the "Set time and date automatically" and choosing an appropriate time server will adjust your Mac's system clock to the precise time.

  • Set value of project code to Reciept from production matrix.

    Hello Friends,
    I want to set value of project code to Reciept from production matrix after selecting Production order number.I have taken project code field in Production order header.That project code value i have to set  in Reciept from production. I got the Project code no by query but I cant set it to Reciept from production  Matrix project column.
    RS.DoQuery("Select U_PrjCode from OWOR where DocEntry='1')
    str = RS.Fields.Item("U_PrjCode").Value
    oMatrix.Columns.Item("21").Cells.Item(1).Specific.value = str
    this code give me an error
    "Item-Cant set value on item because the item cant get focus"
    Plz give me solution for this..
    Thanks & Regards,
       Swati

    Hello Swati,
    The cell should be foucsed before setting value for it. try this:
    RS.DoQuery("Select U_PrjCode from OWOR where DocEntry='1')
    str = RS.Fields.Item("U_PrjCode").Value
    oMatrix.Columns.Item("21").Cells.Item(1).Click()
    oMatrix.Columns.Item("21").Cells.Item(1).Specific.value = str
    Kind Regards
    -Yatsea

  • How to fill values in the system matrix through code

    hi
    All
    i want to fill the system matrix in the sales order in such a way that
    Items will be filled in system matrix in the lost focust event of the Customer Code selection in the Sales order Document
    how can i fill the system matrix through code
    one thing that first column(ItemCode)  of the system matrix column is a Icombbox type
    Now i need to fill out item code using code
    can any one suggest the answer
    thanks in advance

    madhu,
    You need to catch the Validate event, when pVal.BeforeAction = False for form items 4 (CardCode) and 54 (CardName) of the Sales Order form.
    Concerning the form's matrix, you can fill it but you cannot change it (you cannot change the ItemCode column into a ComboBox. Is is a EditText)
    Fill a System matrix's Cell with the following code:
        Dim oMatrix As SAPbouiCOM.Matrix = oForm.Items.Item("38").Specific
        oMatrix.Columns.Item("ItemCode").Cells.Item(Row_Num).Specific.Value = "Item_Code"
    Regards,
    Vítor Vieira

  • Set values in matrix

    hi ,
    i created matrix in screen painter. it includes 3 columns unit of measurement, length, width.
    i want to set values to length and width manually.
    when the form is loaded the length and width should appear in matrix
    Regards,
    Puneeth

    Here an sample to add DataSource-Information via a XML-Editor.
        <form appformnumber="WREDE_CREDITNOTES" FormType="WREDE...
                  <datasources>
                        <dbdatasources>
                            <action type="add">
                                <datasource tablename="@WREDE_CREDITNOTES"/>
                                <datasource tablename="@WREDE_CN_LINES"/>
                            </action>
                        </dbdatasources>
                        <userdatasources>
                            <action type="add">
                                <datasource uid="FolderDS" type="9" size="1"/>
                                <datasource uid="NumAtCard" type="9" size="100"/>
                                <datasource uid="cnnumber" type="9" size="100"/>
                                <datasource uid="dnline" type="0" size="4"/>
                                <datasource uid="lines" type="0" size="4"/>
                                <datasource uid="sum" type="6" size="8"/>
                                <datasource uid="sum2" type="6" size="8"/>
                                <datasource uid="draft" type="0" size="4"/>
                                <datasource uid="Folder2" type="9" size="1"/>
                                <datasource uid="FolderDS" type="9" size="10"/>
                                <datasource uid="FolderDS" type="9" size="10"/>
                            </action>
                        </userdatasources>
                        <DataTables>
                            <DataTable Uid="OPENDN">
                                <Columns/>
                            </DataTable>
                        </DataTables>
                    </datasources>
                    <Menus>

  • Focus after Setting a Form Value within the Validate Event ( =8.8)

    Hi
    Setting Values within Validate Event sets Focus incorrectly on SAP >= 8.8
    The following  example works fine  on SAP 2007.
    Why i don't like this behaviour
      -I didn't found an easy workaround to fix it
      -SetMatrixCellWithoutValidation has the right behaviour but only works with Userdefined - Columns
      -It's a quite common usecase to validate something and in the same step set some values after successful validating (or cancel the input by using BubbleEvent = False)
      -It just worked for 6 years now
      -I have developed around 20+ AddOns and i'm running into this Regression Issue more and more.
    But maybe i'm just missing something.
    So how would you solve the following code now with Versions >= 8.8 ?
    Thanks for any enlightment!
    private void SBO_Application_ItemEvent(string FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent)
                BubbleEvent = true;
                // 11.08.2011 knp
                // use case is for example setting the price according a custom price table
                // it's triggered by the item column in the sales order matrix and sets the unit price
                // Expected: Focus is on the column after "Item" column
                // Result:   Focus is on column after the "Unit Price" column
    validation
                if (pVal.InnerEvent == false)
                    if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_VALIDATE)
                        if ((pVal.FormTypeEx == "139"))
                            if (pVal.BeforeAction == true)
                                if (pVal.ItemUID == "38")
                                    if (pVal.ColUID == "1") // item code
                                        SAPbouiCOM.Matrix oMtx = (SAPbouiCOM.Matrix)SBO_Application.Forms.Item(pVal.FormUID).Items.Item("38").Specific;
                                        SAPbouiCOM.EditText oEd = (SAPbouiCOM.EditText)oMtx.Columns.Item("14").Cells.Item(pVal.Row).Specific;
                                        oEd.Value = "2";

    Hi
    Try this
    private void SBO_Application_ItemEvent(string FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent)
                BubbleEvent = true;
                // 11.08.2011 knp
                // use case is for example setting the price according a custom price table
                // it's triggered by the item column in the sales order matrix and sets the unit price
                // Expected: Focus is on the column after "Item" column
                // Result:   Focus is on column after the "Unit Price" column
    validation
                if (pVal.InnerEvent == false)
                    if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_VALIDATE)
                        if ((pVal.FormTypeEx == "139"))
                            if (pVal.BeforeAction == true)
                                if (pVal.ItemUID == "38")
                                    if (pVal.ColUID == "1") // item code
                                        SAPbouiCOM.Matrix oMtx = (SAPbouiCOM.Matrix)SBO_Application.Forms.Item(pVal.FormUID).Items.Item("38").Specific;
                                        SAPbouiCOM.EditText oEd = (SAPbouiCOM.EditText)oMtx.Columns.Item("14").Cells.Item(pVal.Row).Specific;
                                        oEd.Value = "2";
                                        oMtx.Columns.Item("1").Cells.Item(pVal.Row).Click(SAPbouiCOM.BoCellClickType.ct_Regular, 0);
    Regards
    Arun

  • Item - Can't set value on item because the item can't get focus.  [66000-15

    hi i created one text box in purchase order form and asign the choose from list.l when i choose in edit box its show the following error-- Item - Can't set value on item because the item can't get focus
    Dim lonHeadDatasource As SAPbouiCOM.DBDataSource
    lonHeadDatasource = oOrderForm.DataSources.DBDataSources.Item("OPOR")
    oNewItem1 = oOrderForm.Items.Add("EditDS", SAPbouiCOM.BoFormItemTypes.it_EDIT)
                        Dim oCFLs As SAPbouiCOM.ChooseFromListCollection
                        Dim oCFLCreationParams As SAPbouiCOM.ChooseFromListCreationParams
                        Dim oCFL As SAPbouiCOM.ChooseFromList
                        oCFLs = oOrderForm.ChooseFromLists
                        oCFLCreationParams = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
                        oCFLCreationParams.MultiSelection = False
                        oCFLCreationParams.ObjectType = "INTORDER"
                        oCFLCreationParams.UniqueID = "CFL1"
                        oCFL = oCFLs.Add(oCFLCreationParams)
                        oItem = oOrderForm.Items.Item("4")
                        oNewItem1.Top = 95
                        oNewItem1.Height = oItem.Height
                        oNewItem1.Width = 140
                        oNewItem1.Left = 125
                        oEdit = oNewItem1.Specific
                        oEdit.DataBind.SetBound(True, "OPOR", "U_EditDS")
                        oOrderForm.Items.Item("EditDS").Specific.ChooseFromListUID = "CFL1"
                        oEdit.ChooseFromListAlias = "U_ID"
    Item events
    Try
                If pVal.BeforeAction = False Then
                    If (pVal.FormType = 142) Then
                        Select Case (pVal.ItemUID)
                            Case "EditDS"
                                Select Case (pVal.EventType)
                                    Case SAPbouiCOM.BoEventTypes.et_GOT_FOCUS
                                    Case SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST
                                        Dim bonCflEvents As SAPbouiCOM.ChooseFromListEvent
                                        Dim bonCflList As SAPbouiCOM.ChooseFromList
                                        Dim bnnstrUID As String
                                        Dim bonDTTable As SAPbouiCOM.DataTable = Nothing
                                        bonCflEvents = pVal
                                        bnnstrUID = bonCflEvents.ChooseFromListUID
                                        bonDTTable = bonCflEvents.SelectedObjects
                                        bonCflList = oOrderForm.ChooseFromLists.Item(bnnstrUID)
                                        If pVal.BeforeAction = False Then
                                            If oOrderForm.Mode <> SAPbouiCOM.BoFormMode.fm_FIND_MODE Then
                                                If Not (bonDTTable Is Nothing) Then
                                                    If bonCflList.UniqueID = "CFL1" Then
                                                        If pVal.ItemUID = "EditDS" Then
                                                            Dim value As String = Nothing
                                                            oOrderForm.Items.Item("EditDS").Specific.value = bonDTTable.GetValue(0, 0)
                                                        End If
                                                    End If
                                                Else
                                                    lonHeadDatasource.SetValue("EditDS", lonHeadDatasource.Offset, "")
                                                End If
                                            End If
                                        End If
                                End Select
                        End Select
                    End If
                End If
            Catch ex As Exception
                SBO_Application.SetStatusBarMessage(ex.Message)
            End Try
    Thanks & Regards
    B.Narain

    Hi
    Instead of   oOrderForm.Items.Item("EditDS").Specific.value = bonDTTable.GetValue(0, 0) the following
    lonHeadDatasource.SetValue("U_EditDS", 0, bonDTTable.GetValue(0, 0))
    Regards
    Arun

  • How to Set column value in SO matrix , if the column is not visible.

    Hi,
    We are trying to set value in to a column from sales order matrix with the below mentioned code
    ((SAPbouiCOM.EditText)oMat.Columns.Item("U_TWBS_AC_BaseEntry").Cells.Item(pVal.Row).Specific).String
    it will throw an u201CForm Item is not editable u201C  error if the  column ("U_TWBS_AC_BaseEntry")  visible is set to false through form settings.
    how can we solve the issue,can we use any DI object in order to reset the form settings.
    Thanks & Regards

    Hi
    Try and make the column visible then set the value and make it invisible then
    Hope this helps
    Regards
    Vivek

Maybe you are looking for

  • Why is Chrome so much faster than Safari?

    I'm an Apple and Safari lover, but love goes only so far. I have tried everything with Safari in Yosemite, but it's really in a sad state when it won't even open my Google account page, or my own website. Sadly, I have found so many pages that either

  • Connecting directly to CompactRio from a Matlab program

    Hello I'm working at Control lab of the Aerospace Faculty in Technion - Israel Institute of Technology in Haifa we are working on a new project that we require to establish Computerized control system for Vehicles and Quad-helicopters. we required to

  • Abap run time error during se38 new program creation

    when i try to create a new program, I get runtime error and it says start_call_sick details: database inconsistency : start transaction SICK. TRIGGER LOCATION OF RUNTIME PROGRAM: SAPMSYST INCLUDE : SAPMSYST ROW 1.763 MODULE TYEP MODULE PAI MODULE NAM

  • Spring Web service in Weblogic 10.0

    Hi, I have developed a spring webservice and it is running in tomcat 6.X but now I am trying to deploy that war file in weblogic 10.0 running on jdk5 and I end up with the error org.springframework.beans.factory.BeanCreationException: Error creating

  • Adobe flash error: unable to save the document please try to save it to a different file name

    Hi, I am editing few fla files with my Adobe Flash Professional. Suddenly it stopped saving them and is giving me an error; unable to save the document as... please try to save it to a different file name or to a different location. i changed the loc