Showing results for 
Search instead for 
Did you mean: 

Slow when fill batch numbers in matrix

Former Member
0 Kudos


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.


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?


                    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;



                        oBultosForm = SBO_Application.Forms.GetForm("1470000006", 0);


                        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;




                    oBultosForm = SBO_Application.Forms.ActiveForm;


View Entire Topic
Active Contributor
0 Kudos

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 )  ?



Former Member
0 Kudos

Hi Maik, thanks for your reply. oBultosForm is oBultosForm = SBO_Application.Forms.ActiveForm;

How can I to do it with DI API or DI Server? I dont know how to solve it

Active Contributor
0 Kudos

Hi Pablo,

what type is the ActiveForm ?

My problem is I don't know where you want to write the batchnumbers : e.g. Sales Order or do you want to create them ?

And which window has the codes ?

Former Member
0 Kudos

hi Maik, the Active Form is a Form  created by with visual designer this is called "Gestion de bultos" is used for pack management,

1.- you insert your goods receipt PO and clic add

2.- this open a batch setup windows. here you select the document and later clic in "bultos button".

3.- this open a pack management window (Gestion de bultos) where you insert how you can distribute the quantities, ex. I want 6 pack of 100 and the location is A-01-2-3.

When you clic ok. this close the window (Gestion de bultos) and in the Batch - Setup window insert the batch generated based in the requirement.

my problem is this is slow due at use a GUI for this. I dont know how to do it with DI API, I think in some Transaction Notifications. But is only ideas.

Thanks for your time

Former Member
0 Kudos

Hi Maik, I talked with my boss and finally will try to solve this using the "automatic string creation" in SAP.

Many thanks for your help and time.