on 11-29-2011 10:45 AM
Hi all,
Using the following code on a Sales Order form, I am able to get the value from field "CardCode", but I am not able to set it's value.
Dim oDBDataSource As SAPbouiCOM.DBDataSource
oDBDataSource = oForm.DataSources.DBDataSources.Item("ORDR")
Dim strCardCodeInit As String = oDBDataSource.GetValue("CardCode", 0)
oDBDataSource.SetValue("CardCode", 0, "C.00001")
Same thing happens for UDFs.
I get the error "Item - The item is not a user-defined item [66000-8]".
What am I missing here?
Thank you in advance,
Aris
Hi Aris,
You can only select value from system table as the data source. As you got the exact error message: The item is not a user-defined item. Bypassing field value check is not possible in any ways. The value must copes with the field type.
Thanks,
Gordon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Aris,
In SAP form we can use setValue Function, Try like below
Dim oEdit as SAPbouiCOM.EditText = oForm.Items.Item(u201C4u201D).Specific
Try
oEdit.Value=u201DC.00001u201D
Catch
End try
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thillai,
Thank you for your response.
I tried that too, but I faced problems like different field types (eg. Amount, Date) or "Valid Value - Value does not Exist" or "Form - Bad Value".
"Form - Bad Value" usually appears on Date or Amount type fields.
"Valid Value - Value does not Exist", appears on all ComboBox fields, no matter if the selected value exists on UDF.
So I supposed that using Data Sources, I could bypass these...
Aris
User | Count |
---|---|
85 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.