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

Read Column Cause Crash

hi!

I add a colunm in a matrix, with type it_EDIT

SboColumn = sboMatrix.Columns.Add(Key, SAPbouiCOM.BoFormItemTypes.it_EDIT)

The user type a char in the column. Then I want to read tha value:

sboEditTextKey = sboMatrix.Columns(Key).Cells.Item(Row).Specific

with this line code, sBO crash

str_Value = sboEditTextKey.Value

I must use this:

str_Value = sboEditTextKey.string

versione BO:6.50.097 SP:01 EF:03

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 09, 2004 at 01:05 PM

    There is a bug in this version of the UI, any time you reference an EditText's .VALUE property it will crash.

    This issue has been fixed in 6.50.097 SP:01 EF:07

    Regards,

    John.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 12, 2004 at 01:52 PM

    Andrea,

    the value you are trying to read is stored inside a control SAP calls EditText (basically a textbox).

    The EditText has no value property, hence the crash.

    It is better (and recommended by SAP) to cast the item.specific into the control it really is.

    sboMatrix.Columns(Key).Cells.Item(Row).Specific.string

    will work, but it involves late binding.

    See below:

    Dim sboEditTextKey as EditText

    sboEditTextKey = sboMatrix.Columns(Key).Cells.Item(Row).Specific

    str_Value =sboEditTextKey.String

    Nothing wrong with SAP here. Exept for causing a total crash, which is a little over the edge 😉

    HTH Lutz Morrien

    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.