cancel
Showing results for 
Search instead for 
Did you mean: 

get street address from Business Partner (Matrix problem)

Former Member
0 Kudos

Hello,

I want to get the street value (address) in Business Partner, that is just entered by a user (but not yet saved), because I have to do some comparison before it's saved.

Here is the system info for street in Business Partner:

Item: 178

Columm: 2

Row: 1

And, here is my code (VB):

Dim mtx As SAPbouiCOM.Matrix = SBOapp.Forms.Item(pVal.FormUID).Items.Item("178").Specific
Dim street As String = mtx.Columns.Item("2").Cells.Item("1").Specific.ToString

As the program executes the second line (street As String...), the following error comes up:

System.Runtime.InteropServices.COMException

On part Cells.Item(), I have tried with 0 and pVal.Row, both don't work.

Does anyone have a clue? Really appreciate for any hints! Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

try this:

Dim mtx As SAPbouiCOM.Matrix = (SAPbouiCOM.Matrix)SBOapp.Forms.Item(pVal.FormUID).Items.Item("178").Specific

Dim street As String = ((SAPbouiCOM.EditText)mtx.Columns.Item("2").Cells.Item(1).Specific).ToString

Att,

Former Member
0 Kudos

Thanks Wesley,

I didn't exactly try your code, but your code gave me a hint that I don't need a double quote around it. So, instead of

Cells.Item("1")

I just write

Cells.Item(1)

and it works!

That's why I gave you two points. Thanks again.

Nussi
Active Contributor
0 Kudos

Hi Andre,

what Wesley wanted to say was worth more:

he wanted to clarify that

Cells.Item(row)

is always numeric cause you access the row with long.

when you look in the SDK documentation you can see that.

lg David

Answers (0)