on 12-05-2007 6:25 AM
Hai To All,
Iam using PL 05 i have enable DeleteRow option. If i click the deleterow the row is deleted but after saving the entry there is null value in database. for example if i have 2 row in the matrix if i delete last row the content is deleted after that iam saving the matrix. In the database i have 2 rows one with content and other with null value..
Whts the soultion of this....
Does anyone have idea reply me....
Regards,
Anitha
Hi Anitha,
For the delete option, you need to right a small function if its going to be ur own form.
Try using the following code...
Private Sub DeleteRow()
Dim oDBDSource As SAPbouiCOM.DBDataSource
Dim Count As Integer
Dim oMatrix As SAPbouiCOM.Matrix
Try
oDBDSource = objForm.DataSources.DBDataSources.Item("@TableName")
oMatrix = objForm.Items.Item("3").Specific
oMatrix.FlushToDataSource()
oMatrix.DeleteRow(strRow)
objForm.Update()
'objForm.DataSources.DBDataSources.Item("@TableName").RemoveRecord(strRow - 1)
oDBDSource.Clear()
oMatrix.FlushToDataSource()
oMatrix.LoadFromDataSource()
For Count = 1 To oDBDSource.Size - 1
oDBDSource.SetValue("Code", Count - 1, Count)
Next
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Hope this helps.
Satish.
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 | |
11 | |
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.