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 comment
10|10000 characters needed characters exceeded

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 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 comment
    10|10000 characters needed characters exceeded