on 08-01-2009 2:19 PM
Dear All,
I had assigned CFL on a matrix column. While testing it Choose from List is opening but when I press choose button system not storing value in cell. and system giving me error
Error:
EXCEPTION: EventsHandler.OnAfterChooseFromList raised
Matrix - Line Exist
Can any one help me please?
Thanks & Regards,
VAHANG SHAH
Hi
Try this code in Choose from list event
Dim sboForm As SAPbouiCOM.Form
Dim oDBs_Head As SAPbouiCOM.DBDataSource
sboForm = objMain.objApplication.Forms.Item(FormUID)
oDBs_Head = sboForm.DataSources.DBDataSources.Item("@VEDA_PRN_OBSR_DLN")
Dim oCFL As SAPbouiCOM.ChooseFromList
Dim CFLEvent As SAPbouiCOM.IChooseFromListEvent = pVal
Dim CFL_Id As String
CFL_Id = CFLEvent.ChooseFromListUID
oCFL = sboForm.ChooseFromLists.Item(CFL_Id)
Dim oDT As SAPbouiCOM.DataTable
oDT = CFLEvent.SelectedObjects
If Not (oDT Is Nothing) And pVal.BeforeAction = False Then
If oCFL.UniqueID = "EMP" Then
Dim oForm As SAPbouiCOM.Form
'oForm = objMain.objApplication.Forms.Item(FormUID)
oForm = objMain.objApplication.Forms.GetForm("Obs", 1)
Dim oEditText As SAPbouiCOM.EditText
Dim oMatrix As SAPbouiCOM.Matrix
oMatrix = oForm.Items.Item("5").Specific
Dim s As String = oDT.GetValue("lastName", 0)
'Me.ValToMat(FormUID, s, pVal.Row, BubbleEvent)
'sboForm.DataSources.DBDataSources.Item("U_OName").ValueEx = s
oDBs_Head.SetValue("U_OName", oDBs_Head.Offset, oDT.GetValue("lastName", 0))
'oForm = objMain.objApplication.Forms.GetForm("Obs", 0)
oForm.Select()
'oMatrix.Columns.Item("V_4").Cells.Item(pVal.Row).Click(SAPbouiCOM.BoCellClickType.ct_Regular)
oEditText = oMatrix.Columns.Item("V_4").Cells.Item(pVal.Row).Specific
'Try
oEditText.String = (oDT.GetValue("lastName", 0))
'Catch ex As Exception
'Do nothing
' End Try
End If
End If
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Firoz,
Here is my code:
Select form.TypeEx
Case "JW_ConvMstr"
Select Case pVal.ItemUID
Case "mtx_0"
Dim oCFLEvento As SAPbouiCOM.IChooseFromListEvent
oCFLEvento = pVal
Dim sCFL_ID As String
sCFL_ID = oCFLEvento.ChooseFromListUID
Dim oCFL As SAPbouiCOM.ChooseFromList
oCFL = form.ChooseFromLists.Item(sCFL_ID)
Dim oDataTable As SAPbouiCOM.DataTable
Dim mtx As Matrix = form.Items.Item(pVal.ItemUID).Specific
Dim oEditText As SAPbouiCOM.EditText
oDataTable = oCFLEvento.SelectedObjects
If Not oDataTable Is Nothing Then
form.Select()
With form.DataSources.DBDataSources.Item("@JW_CONVMSTR1")
.SetValue("U_ItemCode", .Offset, oDataTable.GetValue(0, 0))
End With
oEditText = mtx.Columns.Item("col_ii").Cells.Item(pVal.Row).Specific
oEditText.String = (oDataTable.GetValue(0, 0))
'mtx.SetLineData(pVal.Row)
oEditText = mtx.Columns.Item("col_iid").Cells.Item(pVal.Row).Specific
'form.DataSources.UserDataSources.Item("_ItmDesc").ValueEx = oDataTable.GetValue(1, 0)
oEditText.String = (oDataTable.GetValue(1, 0))
'mtx.SetLineData(oCFLEvento.Row)
End If
End Select
End Select
And I am getting error in this line:
....
oEditText = mtx.Columns.Item("col_ii").Cells.Item(pVal.Row).Specific
oEditText.String = (oDataTable.GetValue(0, 0))
....
My error is:
Form - Bad Value
Can you pls tell me why is so....
Regards,
@VHNG
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.