on 04-24-2009 11:06 AM
Deal all,
I added a control to calculate the matrix row total in a SAP-B1 system form, i need to refresh when user delete a matrix row , but I don't know the delete trigger event.
pls help.
Thanks
thanks for your reply.
I put it in MenuEvent, and it is triggered when I right-click "delete".
But would you please advise how can I check the current FormType under MenuEvent ?
I want this event trigger in a specific form only.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi HKCM,
in menu event before action false write this code
If pVal.MenuUID = "1293" Then
If objForm.Mode = SAPbouiCOM.BoFormMode.fm_ADD_MODE Or objForm.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE Then
For intCurrentRow As Integer = 1 To objMatrix.VisualRowCount
objMatrix.Columns.Item("V_-1").Cells.Item(intCurrentRow).Specific.Value = intCurrentRow
Next
End If
and the row count as visualrowcount
and replace the itemevent before actions false rowcounts as visualrowcount
Rgds
Micheal
Thanks Michael,
there is no problem now.
your code is very helpful.
thanks again.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Micheal
thank you very much for your reply.
i know how to catch the event for specific ftorm, but i can't catch your meaning about
"and the row count as visualrowcount
and replace the itemevent before actions false rowcounts as visualrowcount"
here is my code:
If pVal.MenuUID = "1293" And pVal.BeforeAction = False Then
If oForm.Type = "141" And (oForm.Mode = SAPbouiCOM.BoFormMode.fm_ADD_MODE Or oForm.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE) Then
For i As Integer = 1 To oMatrix.VisualRowCount
sum up the line total here .....
next i
end if
end if
my problem is, there is total 4 rows in the matrix, after i delete 1 row, oMatrix.VisualRowCount still returns 4, how can i calculate the line total by ignoring the deleted row ?
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi hkcm,
You need to catch the form's 1293 menu event.
Regards,
Vítor Vieira
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.