on 11-24-2011 9:52 AM
hi,
i create the matrix column based on Header value. its created
now i changed header value for example 10 to 14
now i need create the 4 columns after 10
but its show the error " Matrix-Line Exists"
Below the code
Dim oItem As SAPbouiCOM.Item
Dim oColumns As SAPbouiCOM.Columns
Dim oColumn As SAPbouiCOM.Column
oItem = frmtemplate.Items.Item("MatTemp")
If prvious = "" Then
Dim i As Integer
Dim j As Integer
j = hrs
For i = 0 To hrs - 1
Dim K As String = ""
K = Convert.ToString(i + 1)
oMatrix1 = oItem.Specific
oColumns = oMatrix1.Columns
oColumn = oColumns.Add(K, SAPbouiCOM.BoFormItemTypes.it_EDIT)
oColumn.TitleObject.Caption = K + "hours"
oColumn.Width = 50
oColumn.DataBind.SetBound(True, "@PTM1", "U_Qty")
Next
oGFun.SetNewLine(oMatrix1, oDBDSDetail1)
Else
Dim k As Integer = 0
k = Convert.ToInt64(prvious)
Dim m As Integer
m = hrs - k
Dim y As Integer
oMatrix1 = oItem.Specific
oColumns = oMatrix1.Columns
For y = 0 To m - 1
Dim current As Integer = oMatrix1.Columns.Count()
current += 1
Dim header As String = ""
header = Convert.ToString(current)
oColumn = oColumns.Add(header, SAPbouiCOM.BoFormItemTypes.it_EDIT)
oColumn.TitleObject.Caption = header + "hours"
oColumn.Width = 50
oColumn.DataBind.SetBound(True, "@PTM1", "U_Qty")
Next
End If
Thannks & regards
B.Lakshmi Narayanan
Hi,
Before add columns clear all matrix rows means oMatrix.Clear(). then it will be work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks thillai
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
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.