Skip to Content
0
Former Member
Jun 01, 2009 at 07:57 AM

Return Value into Textbox from CLF Form

37 Views

Hi All

I Designed a Form using Screen Painter and Add some items on that form.One of them is Textbox with ChooseFromList.

Actually what i need is when i select the CLF it opens the Form which contains the Master Data of a Patient .When i select any row from the form code value should fill into the Textbox .

Here iam getting error opening a form using choose from list is working well .when i want return the value into the Textbox it showing the Error Message

Collection - Out of boundaries  [66000-34]

Code:

Dim CLFEvent As SAPbouiCOM.IChooseFromListEvent
                    Dim CLF_Form As SAPbouiCOM.Form
                    Dim CLF_ID As String
                    CLFEvent = pVal
                    CLF_ID = CLFEvent.ChooseFromListUID
                    CLF_Form = SAPapp.Forms.Item(FormUID)
                    Dim CLF As SAPbouiCOM.ChooseFromList
                    CLF = CLF_Form.ChooseFromLists.Item(CLF_ID)
                    If CLFEvent.Before_Action = False Then
                        Dim oDataTable As SAPbouiCOM.DataTable
                        oDataTable = CLFEvent.SelectedObjects
                        Dim val As String
                        val = oDataTable.GetValue(0, 0)
                        If (pVal.ItemUID = "txtPRegno") Or (pVal.ItemUID = "CFL_2") Then
                            CLF_Form.DataSources.DBDataSources.Item("@TB_PATIENTINFO").SetValue("Code", pVal.Row - 1, val)
                        End If
                    End If

Here iam getting the error msg

CLF_Form.DataSources.DBDataSources.Item("@TB_PATIENTINFO").SetValue("Code", pVal.Row - 1, val)

can any one suggest the answer