Skip to Content
0
Former Member
Jul 22, 2008 at 04:26 AM

Regarding CFL Problem

38 Views

Hi friends,

I have Created two tables @IN_HDR,@IN_DTL.

After that i have registered in UDO.

Then in the form,i have bind the data to the header table.

For the Child table, i put a matrix with four columns as ItemCode,ItemName,Qty,ReqdDate.

I Created a CFL for ItemCode with object type 4.

while running,when i press tab in itemcode col CFL is opening.

After that, i chose an item and click choose then it is displaying an error as

"Item - Can't set value on item because the item can't get focus. [66000-153]".

After that it is not setting the value for ItemName.

when i enter 2 times only it is setting the value for itemcode and itemname.

plz help me to solve the problem.

This is my Code :

If pVal.EventType = SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST Then

Dim oCFLEvento As SAPbouiCOM.IChooseFromListEvent

oCFLEvento = pVal

Dim sCFL_ID As String

sCFL_ID = oCFLEvento.ChooseFromListUID

Dim oForm As SAPbouiCOM.Form

oForm = SBO_Application.Forms.Item(FormUID)

Dim oCFL As SAPbouiCOM.ChooseFromList

oCFL = oForm.ChooseFromLists.Item(sCFL_ID)

If oCFLEvento.BeforeAction = False Then

Dim oDataTable As SAPbouiCOM.DataTable

oDataTable = oCFLEvento.SelectedObjects

Dim val2 As String

Dim val3 As String

'Try

' val = oDataTable.GetValue(0, 0)

' val1 = oDataTable.GetValue(1, 0)

'Catch ex As Exception

'End Try

'Try

' If (pVal.ItemUID = "txtcode") Then

' Dim oDS As SAPbouiCOM.DBDataSource

' oDS = oForm.DataSources.DBDataSources.Item("@PSSIT_SPLANHDR") 'add your dbdatasource here

' oDS.SetValue("U_itemcode", oDS.Offset, val) ' val1 is the value you are setting

' oDS.SetValue("U_itemname", oDS.Offset, val1)

' End If

'Catch ex As Exception

' MessageBox.Show(ex.Message)

'End Try

Try

val2 = oDataTable.GetValue(0, 0)

val3 = oDataTable.GetValue(1, 0)

If (pVal.ItemUID = "mat") And (pVal.ColUID = "ItemCode") Then

colItemCode.Cells.Item

'I got the error message in the above line.

(pVal.Row).Specific.Value = val2

colItemName.Cells.Item(pVal.Row).Specific.Value = val3

End If

Catch ex As Exception

End Try

End If

End If

Edited by: Mohana Annadurai on Jul 22, 2008 6:27 AM