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

accessing fields on system matrix

Hello everyone. I want to acess a individual field on the products matrix in the sales order form, so i can compare it with another value, but the system wont let me.

My code is

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

'SBO_Application.MessageBox("2") '- funca

oMatrix = oItem.Specific

ItemCode = oMatrix.Columns.Item(1).Cells.Item(1)

MsgBox(ItemCode)

Anyone knows what am I doing wrong? Thanks in advance.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 12, 2008 at 06:23 PM

    Hi

    Try this instead, see if it works ...

    ItemCode = oMatrix.Columns.Item(1).Cells.Item(1).Specific.Value

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 13, 2008 at 02:29 PM

    Joao,

    the column you are looking for is column 3 and not 1. may be the unique id for column you see in status bar is misleading.

    change it to:

      If ((pVal.FormType = 139 And pVal.EventType  <> SAPbouiCOM.BoEventTypes.et_FORM_UNLOAD) And (pVal.Before_Action = True)) Then
                If ((pVal.ItemUID = "1") And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_CLICK)) Then
     
                    Try
                        oItem = oForm.Items.Item("38")
                        oMatrix = oItem.Specific
                     
                            ItemCode = oMatrix.Columns.Item(1).Cells.Item(1).Specific.Value
                      
     
                        SBO_Application.MessageBox("" & ItemCode)
     
                    Catch ex As Exception
                        SBO_Application.MessageBox("Error!" & vbCrLf & ex.Message & "-" & Err.Number, , "")
                    End Try
         end if
    end if 
    

    hope that helps.

    Binita

    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.