cancel
Showing results for 
Search instead for 
Did you mean: 

Has anyone retrieved a value from a system Matrix from selecting the row

Former Member
0 Kudos

Hi everyone, I am trying to retrieve the value of a cell from the first column of a matrix depending on which row the user has highlighted. I can access the value from specifying which row to retrieve the value from but not from the user selecting which row. Im attempting do do this from the open items list system form which is accessed from the reports menu.

To retrieve the value from the first row my code is as follows:

oMatrix = oForm.Items.Item("5").Specific

DocNo = oMatrix.Columns.Item("1").Cells.Item(1).Specific.Value

SBO_Application.MessageBox(DocNo)

How do I change this code to access the value of the cell depending on which row is highlighted?

Any help would be appreciated

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sally,

you will get the selected row number on any event through "pVal.Row", you can get this value in a integer variable like:

int i = pVal.Row

and pass it in your code;

DocNo = oMatrix.Columns.Item("1").Cells.item(i)

or you can do same in this way also:

you have to specify your particular cell as a edit text and get the value of that:

oEditText=(SAPbouiCOM.EditText)oMatrix.Columns.Item("1").Cells.Item(i).Specific;

string1 = oEditText.String;

Hope it will help.

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks everyone, I have solved the problem....I was attempting to make the click event on the matrix work when the user presses a button which was causing problems...

Gianluigi
Product and Topic Expert
Product and Topic Expert
0 Kudos

Matrix object has 2 methods to get the selected row

GetNextSelectedRow

IsRowSelected