Skip to Content
author's profile photo Former Member
Former Member

Slow when fill batch numbers in matrix

Hi,

I am using the following code to fill a matrix in the batch numbers windows, this codes come from other windows where the user set his batch numbers and click ok.

My problem is this routine is slow based in the user simulation clic and I need this become more fast.

I use the .Freeze(true) command to get more speed, but doesnt work.

Actually this give me 18 codes per minute. My problems is when the user set 6.200.000.

Can provide me some tips to do it? or other way to get the goal.

Thanks.

EDIT: sorry when I want to mean is "Slow" is when my code write on the matrix (the batch number window) how can I get more speed in the process?

oBultosForm.Freeze(true);
                    z = 1;
                    foreach (var item in seriales)
                    {
                        SAPbouiCOM.EditText oEditTex3 = (SAPbouiCOM.EditText)oGrid.Columns.Item(2).Cells.Item(z).Specific;
                        oEditTex3.Value = item.Serial;
                        SAPbouiCOM.EditText oEditTex4 = (SAPbouiCOM.EditText)oGrid.Columns.Item(5).Cells.Item(z).Specific;
                        oEditTex4.Value = item.Cantidad;
                        oGrid.Columns.Item(20).Cells.Item(z).Click(BoCellClickType.ct_Regular);
                        SBO_Application.Menus.Item("5888").SubMenus.Item("5963").Activate();
                        oBultosForm = SBO_Application.Forms.GetForm("1470000006", 0);
                        oBultosForm.Freeze(true);
                        oGrid1 = (SAPbouiCOM.Matrix)oBultosForm.Items.Item("1470000019").Specific;
                        SAPbouiCOM.EditText oEd4 = (SAPbouiCOM.EditText)oGrid1.Columns.Item(1).Cells.Item(1).Specific;
                        oEd4.Value = item.Ubicacion;
                        SAPbouiCOM.EditText oEd5 = (SAPbouiCOM.EditText)oGrid1.Columns.Item(2).Cells.Item(1).Specific;
                        oEd5.Value = item.Cantidad;
                        SBO_Application.Forms.ActiveForm.Items.Item("1470000001").Click(BoCellClickType.ct_Double);
                         z++;
                    }
                    oBultosForm = SBO_Application.Forms.ActiveForm;
                    oBultosForm.Freeze(false);






Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jun 02, 2014 at 07:13 PM

    Hi Pablo,

    I wouldn't recommend to do this using UI API - it is not designed to mass change/update data. In fact it is just simulating user interaction. Actually try to reduce UI API as much as possible ( visual changes, event catching, gui extending ).

    I am not sure where exactly ( oBultosForm ? ) you wanna write the batchnumbers, but normally this tasks can be done much faster using DI API or DI Server.

    From where ( other window = SAP form ? ) to where ( e.g. Order ) ?

    regards,

    Maik

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.