on 12-17-2004 8:46 AM
Hi
I am trying to select certain rows in a matrix, not a user defined one but an actual sbo one. I have tried using the omatrix.select method but vb gives me an error about the item is not a user defined item and cannot be manipulated in such a manner.
Anyone got any ideas please ?
Regards Andy
This code contains your solution.
It iterates over each line in a SYSTEM matrix, and tests for a value in a column. If the value in the column is in a list, it will select that row by executing a 'Click' on the first column in the list.
It has multiple selection logic in it as well, as more than one row in the list may be valid.
NumberOfReceiptsFoundInMatrix = 0
For RowIndex = 1 To ReceiptMatrix.RowCount
Debug.Print ReceiptMatrix.Columns("DocNum").Cells(RowIndex).Specific.Value
If ExistsInCollection(CLng(ReceiptMatrix.Columns("DocNum").Cells(RowIndex).Specific.Value), ReceiptNumbers) = True Then
If NumberOfReceiptsFoundInMatrix = 0 Then
'
' Single select
'
Call ReceiptMatrix.Columns(1).Cells(RowIndex).Click(ct_Regular)
Else
'
' Multiple select for all further Receipts
'
Call ReceiptMatrix.Columns(1).Cells(RowIndex).Click(ct_Regular, mt_CTRL)
End If
'
' Track the number of Receipts that have been found, so the searching can stop once all
' the Receipts have been selected.
'
NumberOfReceiptsFoundInMatrix = NumberOfReceiptsFoundInMatrix + 1
End If
If NumberOfReceiptsFoundInMatrix = ReceiptNumbers.Count Then
'
' Break out of for loop early if all of the Receipts have been found.
'
Exit For
End If
Next RowIndex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Most system form have restrictions to what the SDK can do with them... But try clicking the grayed-out column in the system matrix... Most system matrices selcet rows that way....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rasmus
I have added a button and am clicking on that, I select certain rows if they belong to a certain warehouse. It's then I get a error message about the item not being user defined and cannot me manipulated in that maner.
I think it would work fine on a user defined matrix but not on a sap one
Regards Andy
User | Count |
---|---|
94 | |
11 | |
11 | |
6 | |
6 | |
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.