cancel
Showing results for 
Search instead for 
Did you mean: 

UI: Cannot get GetLineData to work

Former Member
0 Kudos

Hi,

I'm trying to read data out of a matrix through getlinedata and I keep getting same line.

Situation:

I have three matrices, all are bound to the same userdatasource (actually a set of 3 overlapping ones in 3 different folders). They are filled through a SboRecordset.doquery, which is channeled through a bound suerdatasource for each column. This works actually quite fast, which was a bit of a surprise for me. btw: I never had to use setlinedata, because this appears to be implicit when you use a matrix.addrow (??) Anyway it is exactly like the example, only three-fold and re-using the userdatasources.

Problem:

Now I'm trying to read the data back to sync it with the database. Even though I do a getlinedata with a different index each time, I keep getting the last added line back. So I'm trying to read lines from matrix1, but I keep getting the last line from matrix3. No matter what the index, no matter what the indicated matrix.

This is my code:

With oSboForm

Set oSboMatrix = .Items(strMatrix).Specific

Set oSboUserDataFieldCode = .DataSources.UserDataSources.Item("FieldCode")

Set oSboUserDataFieldValue = .DataSources.UserDataSources.Item("FieldValue")

For lngTeller = 1 To oSboMatrix.RowCount

oSboMatrix.GetLineData (lngTeller)

strFieldName = oSboUserDataFieldCode.Value

strValue = oSboUserDataFieldValue.Value

'do update

Select Case strStatus

Case "Insert":

'do insert

Case "Update":

'do update

End Select

Next

End With

Now, can anyone tell me what I'm doing wrong? Is there an example of a working getlinedata somewhere (I can't find it in the examples, sapnotes or this forum). Everyone just tells you to use getlinedata, but there is no example...

Accepted Solutions (1)

Accepted Solutions (1)

former_member185703
Active Contributor
0 Kudos

Hi Jacques,

there are scenarios around the usage of the Matrix object where "GetLineData" always gives you the last line of a Matrix (UserDataSource?)

Here's some bug description:

Bug of getline data when there is more then one column that is bound to the same user data source that is changed during GetLineData.

When this scenario occurs, the value of the data source after activation of GetLineData is not "accurate".

This bug will be fixed in the 6.5 SP1 which will be shipped soon, ASFAIK.

Regards,

Frank

Answers (0)