Skip to Content
author's profile photo Former Member
Former Member

Error clicking Choose from list

Hi,Experts

1) Im added two fields on BOM also added choose from list for that.

2)I have written code for event type choose from list

3)But it is showing error exception while clicking on raw choose from list(Already existing raw choose from list)

4) But created choose from list working perfectly

I have written code like this

Try

If pVal.EventType = SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST Then

sboForm = SBO_Application.Forms.Item(FormUID)

Dim oCFLEvento As SAPbouiCOM.IChooseFromListEvent

oCFLEvento = pVal

Dim sCFL_ID As String

sCFL_ID = oCFLEvento.ChooseFromListUID

Dim oCFL As SAPbouiCOM.ChooseFromList

oCFL = sboForm.ChooseFromLists.Item(sCFL_ID)

If oCFLEvento.BeforeAction = False Then

Dim oDataTable As SAPbouiCOM.DataTable

oDataTable = oCFLEvento.SelectedObjects

Dim val As String

Try

val = oDataTable.GetValue(0, 0)

Catch ex As Exception

End Try

If (pVal.ItemUID = "slsText") Then

sboForm.DataSources.UserDataSources.Item("UDCFL").ValueEx = val

ElseIf (pVal.ItemUID = "slsText1") Then

sboForm.DataSources.UserDataSources.Item("UDCFL1").ValueEx = val

End If

End If

End If

If (FormUID = "CFL1") Or (FormUID = "CFL2") And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_UNLOAD) Then

Windows.Forms.Application.Exit()

End If

If pVal.EventType = SAPbouiCOM.BoEventTypes.et_PICKER_CLICKED Then

sboForm = SBO_Application.Forms.Item(FormUID)

oItem = sboForm.Items.Item(pVal.ItemUID)

oEdit = oItem.Specific

SBO_Application.StatusBar.SetText("Picker Clicked of type " & oEdit.PickerType.ToString, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success)

End If

Catch ex As Exception ///Error is shows this exception

MessageBox.Show(ex.Message)

End Try

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jul 17, 2009 at 03:50 AM

    hi

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.