Skip to Content
Former Member
Oct 22, 2008 at 04:45 PM

Combo XML


Hello experts. I have an UDO created in xml that has an item that is the combo, which would have to show me a description that this in a table according to the code of another table. If the UDO I do it for fault it me relates it well, but when I raise the xml it me does not relate it and shows me only the code. Thank you.

<item AffectsFormMode="1" uid="13" type="113"...

<AutoManagedAttribute />


<databind alias="U_TGV_FIIBB_CODE" databound="1" table="@TGV_TIIBB_CODES_BP" />



<item AffectsFormMode="1" uid="14" type="8"...

<specific caption="Codigo de IIBB" />


Dim oFrm As SAPbouiCOM.Form

Dim oRS As SAPbobsCOM.Recordset = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)

Dim intRecCount As Integer

oFrm = SBO_Application.Forms.GetForm("BPAR21", 1)

If oFrm.Items.Count > 0 Then

Dim oCombo As SAPbouiCOM.ComboBox

oCombo = oFrm.Items.Item("13").Specific

If oCombo.ValidValues.Count = 0 Then

oRS = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)

oRS.DoQuery("SELECT Code as Code, Name as Name FROM [@TGV_TIIBB_CODES] ORDER BY Name")

intRecCount = oRS.RecordCount

If intRecCount > 0 Then

Dim sCode As String = ""

Dim sName As String = ""


While Not oRS.EoF

If Not oRS.Fields.Item(0).Value Is Nothing Then

sCode = oRS.Fields.Item(0).Value

If Not oRS.Fields.Item(1).Value Is Nothing Then

sName = oRS.Fields.Item(1).Value


sName = " Not defined "

End If

oCombo.ValidValues.Add(sCode, sName)

End If


End While

End If

Edited by: Andres Blanco on Oct 22, 2008 6:52 PM