cancel
Showing results for 
Search instead for 
Did you mean: 

Combo XML

Former Member
0 Kudos

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 />

<specific>

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

</specific>

</item>

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

<specific caption="Codigo de IIBB" />

</item>

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 = ""

oRS.MoveFirst()

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

Else

sName = "Not defined "

End If

oCombo.ValidValues.Add(sCode, sName)

End If

oRS.MoveNext()

End While

End If

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

Accepted Solutions (1)

Accepted Solutions (1)

Nussi
Active Contributor
0 Kudos

Hi,

i hope i understood your problem...

if you want to see the description in the combobox when you select a value use:

oFrm.Items.Item("13").DisplayDesc = true

lg David

Former Member
0 Kudos

Thank you very much, it was what I was lacking. Pardon for not having expressed correctly. Regards.

Answers (0)