Skip to Content
0
Former Member
May 13, 2005 at 06:12 AM

I have a problem 'LoadToDataSource'

27 Views

Hi, Everyone!

I have a big big problem 'LoadToDataSource' Method

I make 2 Usertables (one is master type "@ZPH", other is master line type "@ZPL"), UDO("ZPH"), form(in screen painter), Bind Usertable in form (editbox, matrix).

It works good. adding, updating, deleting , Finding

But , if I input in code

-


<i>Dim odbds As SAPbouiCOM.DBDataSource

' Header Table Update

Set odbds = oForm.DataSources.DBDataSources("@ZPH")

odbds.setValue "U_Stat", 0, "O"

Set odbds = Nothing

' Line Table Update

oMatrix.FlushToDataSource

Set odbds = oForm.DataSources.DBDataSources("@ZPL")

<b>If odbds.getValue("U_ItemCode", oRow - 1) <> "" then

odbds.setValue "U_ProQty", oRow - 1, 25

endif</b>

oMatrix.LoadFromDataSource'(or oMatrix.SetLineData oRow)

Set odbds = Nothing</i>

-


I push "Update" button. Master Table is updated very well.

<b>But Master Line Table is not!!

And Something Strange is the Master Line Log Table(@AZPL) is inserted.(Although Master Line Table not Updated) </b>

Why things like happened?

Is it SDK bug? Or do you konw patch version for this problem?

I used SDK 6.7

And

-


<i>Dim odbds As SAPbouiCOM.DBDataSource

' Header Table Update

Set odbds = oForm.DataSources.DBDataSources("@ZPH")

odbds.setValue "U_Stat", 0, "O"

Set odbds = Nothing

' Line Table Update

oMatrix.FlushToDataSource

Set odbds = oForm.DataSources.DBDataSources("@ZPL")

<b> If odbds.getValue("U_ItemCode", oRow - 1) <> "" then

oMatrix.Columns("8").Cells(oRow).Specific.String =25

endif</b>

Set odbds = Nothing</i>

-


If I do like such as "<u>oMatrix.Columns("8").Cells(oRow).Specific.String =25</u>", It is very good.

But It is not for me. Because the Cursor moves from current column to the Column "8" and Back Current column.

I want to 'LoadDataSource'.

Do you know any Solution?