cancel
Showing results for 
Search instead for 
Did you mean: 

Deleting Master Data Line from matrix in UDO

Former Member
0 Kudos

Hello,

I know this topic has come up a lot. I have read all the solutions proposed and none of them worked for me.

When I have more than one Master Data Line in my matrix, I am able to delete a row using the following code:

form.DataSources.DBDataSources.Item(1).Clear()

matrix.DeleteRow(row)

matrix.FlushToDataSource()

form.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE

However, when there is only one row in the matrix and I want to delete it, the above method doesn't work.

Any suggestions?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ralph,

What is the value of the "row" variable? The first row is number 1. Do you get an error and is your code in a try...catch block?

Hope it helps,

Adele

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Adele,

row is the selected row number, and i am not getting any errors.

Thank you