cancel
Showing results for 
Search instead for 
Did you mean: 

how get importance from cell in Matrix?

Former Member
0 Kudos

hi all

a have matrix with 2 columns. i known also row number (examle 5). how me get data from Cell(1,5) (1 - is column, 5 - is row)??

thanks and hallo from Moscow, Russia

Accepted Solutions (0)

Answers (2)

Answers (2)

Trinidad
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

If you have datasources linked to your matrix you better go over the datasources to obtain the content.

Otherwise you can go over the matrix object (item with ID you can see in B1 form by selecting option View -> System Information) and use the properties of the matrix to go over it.

Here you have the code to read directly from a matrix:

'Matrix object

Dim clsMatrix as SAPbouiCOM.Matrix

Set clsMatrix = form.Items(MATRIX_ITEM).Specific

'Matrix cell

Dim clsCell as SAPbouiCOM.Cell

Set clsCell = clsMatrix.Columns.Item(3).Cells.Item(2).Specific

You have a thread talking about it:

Hope it helps

Trinidad.

Former Member
0 Kudos

Hi Artem,

You first have to get the form and then the matrix. You get this by the item number in the system information in the status bar, like:

Dim oForm as SAPBouiCom.Form
Dim oMatrix as SAPBouiCom.Matrix
oForm = oApplication.Forms.ActiveForm
oMatrix = oForm.Items.Item("55").Specific

Then you can get the value from the cell:

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

That is if the column is an edit text standard column.

Hope it helps,

Adele