on 02-06-2007 1:56 PM
Hello
I have a problem when setting the value to an edit item that it's tied to a UDF that I created in the Invoices table.
When I set the value that I read from a recordset the edit box remains empty.
I have tried many ways of setting it:
pappl.forms.item("").items.item("").specific.value
pappl.forms.item("").items.item("").specific.String
edit.String
edit.Value
and neither of them worked. They work sometimes, but half of the times the edit box remains empty. The rutine doens't trow an exception, it just sets "" to the box.
Does anybody know how to fix this? or work around it?
Thank you very much
Hi Jessica,
you should try this code for set the value in edit text.
SAPbouiCOM.EditText oEditText
oEditText=(SAPbouiCOM.EditText)oForm.Items.Item("your edit text id").Specific
oEditText.Value = your value string
it will working perfect.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you.
I have already tried it and it works for the first 3 or 4 invoices I do, but then it stops getting the value again.
I think it's a problem with the Databind, that stops accepting values or something. I am running verion 6.8, do you know if it's something wrong maybe with the SBO version?
Thanks
Hi,
did you consider that the UDFs in case of the invoice are not on form 133? Instead it's form -133.
In my case this works (if it's checked before that the invoice-form/count=1 exists):
Dim oFormInv As SAPbouiCOM.Form
Dim oEtx As SAPbouiCOM.EditText
oFormInv = SboCon.SboUI.Forms.GetForm("-133", 1)
oEtx = oFormInv.Items.Item("U_xyz").Specific
oEtx.Value = "1234"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The UDF-Part of the SAP-forms seems to be allways on the "negative" number of the mainform.
When you activate the Top-Menu View->System Information you see it in the statusbar while going "mouseover" the items of the form.
Another problem is that it's not guaranted that the UDF-form is open. Maybe you must perform a menu-click on View->User-defined-fields with SDK to show the UDF-form before setting the edit-text value.
Another way could be to add a edit-text-field on the main form and bind it to the db-datasource.
But I'm also in experimentation for the best solution....
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.