on 04-08-2010 4:04 PM
Hi experts,
I have added a CFL in my matrix column to choose A/R invoice "DocNum".
Can someone show me where i do the error in this code.
If pVal.EventType = SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST Then
Dim oEdit As SAPbouiCOM.Column
Dim oCFLEvento As SAPbouiCOM.IChooseFromListEvent
oCFLEvento = pVal
Dim sCFL_ID As String
sCFL_ID = oCFLEvento.ChooseFromListUID
Dim oCFL As SAPbouiCOM.ChooseFromList
oCFL = oForm.ChooseFromLists.Item(sCFL_ID)
If oCFLEvento.BeforeAction = False Then
Dim oDataTable As SAPbouiCOM.DataTable = oCFLEvento.SelectedObjects
'Dim val As String
Try
With oForm.DataSources.DBDataSources.Item("@FTACT")
.SetValue("U_Fact", .Offset, oDataTable.GetValue(0, 0))
End With
Catch ex As Exception
End Try
If (pVal.ItemUID = "mtx_13") And (pVal.ColUID = "V_2") Then
Try
oEdit = oMatrix2.Columns.Item("V_2")
oEdit.Value = oDataTable.GetValue(0, 0)
Catch ex As Exception
End Try
End If
End If
End If
Regards.
Hi,
I want to know : if you add CFL in matrix column with screen painter, must you add the procedure "AddChooseFromList()" in your
add-on code?
Regards.
Ol.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oliver,
the SetValue Method requires 3 parameters
Public Sub SetValue( _
ByVal Index As Variant, _
ByVal RecordNumber As Long, _
ByVal newVal As String _
)
You should provide recordnumber as the second parameter which means: the position in the dbdatasource where you whould like to set the value.
Regards
J
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
6 | |
5 | |
5 | |
5 | |
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.