cancel
Showing results for 
Search instead for 
Did you mean: 

Very slow performance when assigning value to a form item

Former Member
0 Kudos

Dear all,

I have an add-on form that contains 30 text edits. I did not creat the from with screen painter but positioned them by marking each item's top and left position in the new sub.

I have named them as 'edBox1', 'edBox2'......, 'edBox30'

At a point I need to assign value to each edit text, I have queried the content from DB into one recordset. However, when I start to assign values to each edit text, the performance became very slow.

my code is as follow

me.form.items.item("edBox1").Specific.String = recordset.field.item(0).value.tostring

.

.

.

.

me.form.items.item("edBox30").Specific.String = recordset.field.item(29).value.tostring

I found that B1 seem to iterate each item on the form in order to find the item I specified.

so I think I should specificy items earler.

Now for each item I dim an object for it at new sub

Dim oedBox1 As SAPbouiCOM.EditText

.

.

Dim oedBox30 As SAPbouiCOM.EditText

and while creating forms, I specificy each item to the matched object

Then I assign values to items by

oedBox1.String = recRetrive.Fields.Item(0).Value.ToString

.

.

oedBox30.String = recRetrive.Fields.Item(29).Value.ToString

However, B1 still iterates to find the item and the performance is still slow, does anyone has a better solution to this issue? please kindly advise.

Thank you

Alan

Edited by: Chih-Peng Chen on Dec 17, 2007 8:42 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Chen,

you can find one example under SDK samples which will guide on using datasources

Bind the controls to dbdataource and then query the datasource.

then update form using oForm.Update(),this will automatically fill the values in all edit boxes and it will be very fast as well

Hope it helps you

Regards

Vishnu

Former Member
0 Kudos

Thanks, Vishnu

That's really helpful~

Former Member
0 Kudos

Hi Chen and Vinshu,

Appreciate if you guys can show your script.

I really can't stand with the processing speed when updating only less than 10 combinations of UDF and system columns in Delivery Form.

Former Member
0 Kudos

Hi Chih Peng,

How did you resolve this issue. I had the same problem with system form e.g. Sales Delivery Note Form

Answers (0)