cancel
Showing results for 
Search instead for 
Did you mean: 

ChooseFromList and user table

Former Member
0 Kudos

Hi,

I have created a ChooseFromList and I would like to link it with a user table.

I succeeded with Business Partners (table OCRD, ObjectType=2 and Alias=CardCode) but is it possible with a user table?

If yes, what are the good properties?

Thank you,

Thibault

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Thibault,

As far as I can see in the SDK Help, the choose from list only works with Objects. So you need to define your usertable as a User Defined Object (UDO). You'll find a tutorial in the SDK help wich describes how to add a UDO. Below a snippet from the SDK Help, the ChooseFromListCreationParams Object.

<b>Public Property: ObjectType</b>

Returns or sets a string specifying the type of object on which the system performs the query.

For example, "2" will query the Business Partners object. For a list of object types, see BoLinkedObject. <b><i>You can also query UDO objects.</i></b>

Hope it helps,

Rowdy

Former Member
0 Kudos

Hi,

My ChooseFromList is almost perfect.

However, I would like that the description of the item I choose in the CFL appears instead of the code.

I have tried something like that :


                If (pVal.EventType = SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST) Then
                    If (pVal.ItemUID = "Bouton" Or oEdit.String = "*" Or CStr(pVal.CharPressed) = "0") Then

                        Dim oDataTable As SAPbouiCOM.DataTable
                        oDataTable = pVal.SelectedObjects
                        Dim val As String
                        Try
                            val = oDataTable.GetValue("Name", 0)
                            oEdit.String = val
                        Catch err As Exception
                        End Try
                    End If
                End If

But it doesn't works well, another form opens itself and the description doesn't appear.

Any idea of my problem?

Thanks

Thibault

Former Member
0 Kudos

Hi Thibault,

Maybe what you're missing is to check if is a BeforeAction event.

HTH,

Ian

Former Member
0 Kudos

Hi Ian,

No, I checked if there is a BeforeAction event.

And when I write

val = oDataTable.GetValue("Code", 0)

for the first column it works very well.

I don't understand why it doesn't work for the second column...

Regards,

Thibault

Message was edited by: Thibault Romieu