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

Getting .text out of a sysform

I have successfully trapped a click event on a button I have created on the adress tab of the business partner master data screen. Now, I want to be able to read the .text properties of the cells in the address matrix.

I want to be able to read the "street", "block", "city", "state" etc .text properties. Can someone give me a little help on how I might do this at runtime in my add-on? I am sure it's pretty straight forward, I am just having some trouble finding example code.

In a nuthshell:

How do I get (Form 134, Item 178, COL 2, ROW1).text using vb.net or c#.net

Thanks in advance!

Ty Babcox

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 14, 2005 at 09:14 AM

    sorry I can't finde Item 178 in Form 134.

    But I have a sample for you to get the text from a matrix:

    Dim oItem As SAPbouiCOM.Item

    Dim Source As Matrix

    Dim EText As SAPbouiCOM.EditText

    Dim Temp As String

    '----


    Set oItem = SBO_Application.Forms(FormUID).Items.Item("178")

    Set Source = oItem.Specific

    Set EText = Source.Columns(2).Cells(1).Specific

    Temp = EText.Value

    hope it helps

    Marcel Fuchs

    Message was edited by: Marcel Fuchs

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 14, 2005 at 07:10 PM

    Ok, I got it

    Dim oItem As SAPbouiCOM.Item

    Dim Source As SAPbouiCOM.Matrix

    Dim EText As SAPbouiCOM.EditText

    Dim Temp As String

    '----


    oItem = SBO_Application.Forms.ActiveForm.Items.Item("178")

    Source = oItem.Specific

    Try

    EText = Source.Columns.Item("2").Cells.Item(1).Specific

    SBO_Application.MessageBox(EText.Value)

    Catch ex As Exception

    SBO_Application.MessageBox(ex.Message)

    End Try

    Can anyone PLEASE shed some light as to why some index's can be integers and others must be strings????? I had to pass a string as a parameter to the Item collection and a string to the item collection???? I am confused...

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Ok, so your example of

      Set EText = Source.Columns.Item("2").Cells.Item("1").Specific

      was not quite right. I guess I understand the process now. It would be nice if intellisense showed what type of parameter was expected for these collections. Both the Columns and Cells collections say thay want "Index as Object" rather than something like:

      "Index as string" or "index as integer"

      I thank you greatly for your help!

  • author's profile photo Former Member
    Former Member
    Posted on Feb 14, 2005 at 07:05 PM

    I think I am closer but I get a blank string in my "messagebox" even though the screen field has data...

    Dim oItem As SAPbouiCOM.Item

    Dim Source As SAPbouiCOM.Matrix

    Dim EText As SAPbouiCOM.EditText

    Dim Temp As String

    '----


    oItem = SBO_Application.Forms.ActiveForm.Items.Item("178")

    Source = oItem.Specific

    EText = Source.Columns.Item(2).Cells.Item(1).Specific

    SBO_Application.MessageBox(EText.Value)

    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.