cancel
Showing results for 
Search instead for 
Did you mean: 

Item cant set value on item because item cant get focus

Former Member
0 Kudos

Hi all...

I'm using the choosefromlist on matrix column. when i select the value from this list and try to set the matrix column it gives error:

Item cant set value on item because item cant get focus...

Edited by: Pari Minhas on Oct 4, 2008 12:17 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi

can u give me code where u r getting this error

regards,

varma

Former Member
0 Kudos

Try

Dim oMatrix As SAPbouiCOM.Matrix

Dim oColumn As SAPbouiCOM.Column

Dim oCell As SAPbouiCOM.Cell

Dim oEdit As SAPbouiCOM.EditText

' MatrixID

oMatrix = oForm.Items.Item("Ledger").Specific

oColumn = oMatrix.Columns.Item("LCode")

oCell = oColumn.Cells.Item(iRow)

oEdit = oCell.Specific

oEdit.Value = LCode

////// gives error on the above line //////

oColumn = Nothing

oCell = Nothing

oEdit = Nothing

oColumn = oMatrix.Columns.Item("LDesc")

oCell = oColumn.Cells.Item(iRow)

oEdit = oCell.Specific

oEdit.Value = LDesc

oColumn = Nothing

oCell = Nothing

oEdit = Nothing

oMatrix = Nothing

oForm.DataSources.UserDataSources.Item("EditDS").ValueEx = Nothing

oForm.DataSources.UserDataSources.Item("EditDS1").ValueEx = Nothing

Catch ex As Exception

b = False

' log exception

Finally

System.GC.Collect() 'Release the handle to the table

End Try

Former Member
0 Kudos

Hi now run the code

Dim oMatrix As SAPbouiCOM.Matrix

Dim oColumn As SAPbouiCOM.Column

Dim oCell As SAPbouiCOM.Cell

Dim oEdit As SAPbouiCOM.EditText

' MatrixID

oMatrix = oForm.Items.Item("Ledger").Specific

Try

dim stsr as string

oEdit = oMatrix.Columns.Item("Column-ID").Cells.Item(i).Specific

oedit1.Value = stsr

Catch ex As Exception

end try

oColumn = Nothing

oCell = Nothing

oEdit = Nothing

oColumn = oMatrix.Columns.Item("LDesc")

oCell = oColumn.Cells.Item(iRow)

oEdit = oCell.Specific

oEdit.Value = LDesc

oColumn = Nothing

oCell = Nothing

oEdit = Nothing

oMatrix = Nothing

oForm.DataSources.UserDataSources.Item("EditDS").ValueEx = Nothing

oForm.DataSources.UserDataSources.Item("EditDS1").ValueEx = Nothing

b = False

Regards...

Billa 2007

Former Member
0 Kudos

yup it works...thnx

Answers (2)

Answers (2)

Former Member
0 Kudos

hi,

did you assigned ChooseFromListAlias to the column

regards,

varma

Former Member
0 Kudos

yup..

Former Member
0 Kudos

Hi...

This error not a problem even i also got same thing.

which column u got use this way

Try

Oedit = ocl.Cells.Item(omatrix.rowcount).Specific

Oedit.Value = string

Catch ex As Exception

End Try

Regards..

Billa 2007

Former Member
0 Kudos

this is not working.....

Former Member
0 Kudos

Hi..

which column u got error there give try catch with out msg box

Regards...

Billa 2007

Former Member
0 Kudos

its the first column on which i'm doing tab operation.and its giving error first time only...other wise it runs perfectly..

Edited by: Pari Minhas on Oct 4, 2008 1:07 PM