cancel
Showing results for 
Search instead for 
Did you mean: 

Matrix data

Former Member
0 Kudos

Hi I'm trying to add data to the matrix in the purchase order form. Can someone please help me? this is what I have so far...

oItem = oForm.Items.Item("38");

oMatrix = (SAPbouiCOM.Matrix)(oItem.Specific);

oText = (SAPbouiCOM.EditText)(oMatrix.Columns.Item(0).Cells.Item(0).Specific);

oText.Value = "1000001";

Edited by: Costas Ioannou on Jan 30, 2008 11:53 AM

Accepted Solutions (1)

Accepted Solutions (1)

Nussi
Active Contributor
0 Kudos

whats exaclty your problem ?

when you want for example edit in line 1 the itemcode you can use this sample code

lines = 1;

((SAPbouiCOM.EditText)((SAPbouiCOM.Matrix)(oForm.Items.Item("38").Specific)).Columns.Item("1").Cells.Item(lines).Specific).Valu = "A1000";

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi

If You Want add line data in PO form then it is mandatory that you need to select the vendor first

then use the same code as you are doing now

oItem = oForm.Items.Item("38");

oMatrix = (SAPbouiCOM.Matrix)(oItem.Specific);

oText = (SAPbouiCOM.EditText)(oMatrix.Columns.Item(1).Cells.Item(Rownumber).Specific);

oText.Value = "1000001";

Hope it helps you

Regards

Vishnu

Former Member
0 Kudos

Costas,

try this,

oMatrix = Frm_PO.Items.Item("38").Specific ' Item Grid

oMatrix.AddRow()

For i As Integer = 1 To Rec.RecordCount

If i = (Rec.RecordCount) Then

oCon = oCons.Add()

oCon.Alias = "ItemCode"

oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL

oCon.CondVal = CStr(Rec.Fields.Item(0).Value)

Else

oCon = oCons.Add()

oCon.Alias = "ItemCode"

oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL

oCon.CondVal = CStr(Rec.Fields.Item(0).Value)

oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_OR

End If

Frm_PO.Items.Item("112").Click()

oMatrix.Columns.Item("1").Cells.Item(i).Specific.String = Rec.Fields.Item(0).Value

Rec.MoveNext()

Next

Regards,

Anitha

Edited by: ani nazir on Jan 30, 2008 5:17 PM

Former Member
0 Kudos

Hi Costas,

i think that you want to add new item in item list system matrix. You`l have to do addrow() on matrix first (if there are data already) and this new row fill. Sample code you may find in SDK files (06.UseMatrix).

Petr