Skip to Content
author's profile photo Former Member
Former Member

Matrix data

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Best Answer
    Posted on Jan 30, 2008 at 11:08 AM

    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";

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 11:14 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 11:47 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 12:59 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.