cancel
Showing results for 
Search instead for 
Did you mean: 

Read Column Cause Crash

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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

Former Member
0 Kudos

In SBO 6.5 UI, EditText objects do have a VALUE property. This returns the data in a fixed format unlike the STRING property which varies according to SBO display settings.

I encountered the bug I mentioned when testing add-ons using using 6.5 SP1 EF3. If you check the EF7 Fix List you will see: UI_Crash occurs when using EditText.Value with UI, Note 748672

NB. The VALUE property didn't exist in SDK 6.2. The STRING property can be used instead as the bug did not affect it, however this may require code changes if for example processing a Date field where VALUE returns YYYYMMDD format and STRING does not. It would however be better to upgrade to EF7.

Regards,

John.

Former Member
0 Kudos

John,

forgive me. I am still forced to work with 6.20 so all my knowledge is on this version.

I really have to get to 6.5.

lutz Morrien

Former Member
0 Kudos

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.