cancel
Showing results for 
Search instead for 
Did you mean: 

How to get Copy From combobox selected value

Former Member
0 Kudos

Dear Exprerts,

I would like to get the selected value of the "Copy from" combobox in 8.8 and 8.81 with next code but without luck.

If (pVal.ItemUID = "10000330") Then
            If (pVal.EventType = BoEventTypes.et_COMBO_SELECT) And (pVal.BeforeAction = False) Then
                Dim oDeliveryForm As SAPbouiCOM.Form = SBO_Application.Forms.GetForm(pVal.FormType, pVal.FormTypeCount)
                Dim oComboBox As SAPbouiCOM.ComboBox

                'Dim oEditText As SAPbouiCOM.EditText

                Dim str As String

                'Dim lNum As Long

                oComboBox = oDeliveryForm.Items.Item("10000330").Specific

                str = oComboBox.Selected.Description
                SBO_Application.MessageBox(str)
            End If
        End If

In the 2007A version this is worked. Anybody has idea about what did I wrong?

Thank you in advance.

Nghia

Accepted Solutions (0)

Answers (2)

Answers (2)

andy_bolton
Explorer
0 Kudos

Hi I am getting exactly the same problem with a combo button that I have added an extra value to.

The code below works fine in 2007A but not in 8.81;

// Process Sales Quote Form

if (Form.TypeEx == "149")

{

if (ItemUID == "10000329")

{

SAPbouiCOM.ComboBox ComboBox = (SAPbouiCOM.ComboBox)Form.Items.Item("10000329").Specific;

if (ComboBox.Selected.Description == "FLN_PUR_QUOTE")

CopyFromSalesQuote(Form);

}

return;

}

The ComboBox.Selected returns as a null value.

(This code is executed with the Before_Action set to false).

Can someone please extablish if this is a 8.81 bug or if there is another way to determine the selected option.

Former Member
0 Kudos

Hi Nghia,

You may check this:

Thanks,

Gordon