on 07-09-2004 1:56 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.