on 10-22-2015 10:41 AM
Hi Experts,
I added CFL with Object Type - 176 [Customer Equipment Card] in Customer Equipment Card Screen to load the existing Manufacturer Serial No.
But it was not working like a normal CFL process.
While i am trying to Choose one serial no in my customized CFL Control, instead of choosing that serial no it is loading that particular record in that screen . i.e., it is working like finding a record in find mode.
Thanks,
Ramkumar N
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In SAP B1 Customer Equipment Card you can find the CFL "Previous SN,New SN" .Like that I had created one CFL in that Screen.
If i tried to do CFL operation , that value needs to be loaded in that CFL textbox. This is the normal CFL process.
Assume that we are going to search the InsId=4 for that textbox and the Screen was in Add Mode.
After Choosing that record with InsId=4 ,the Cfl is not working as mentioned in line 2 .Now after choosing the record , the form was in OK mode and it was showing the details of InsId=4 in that form i.e., It was working like, if we are choosing the record InsId=4 in Find Mode.
Thanks,
Ramkumar N
Hi,
Please find the Code,
Private Sub objApplication_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles objApplication.ItemEvent
Try
If pVal.BeforeAction = False And pVal.FormTypeEx = "60150" Then
Dim ObjForm As SAPbouiCOM.Form
Select Case pVal.EventType
Case SAPbouiCOM.BoEventTypes.et_FORM_LOAD
'-------------------------------------------------------------------------------------------------------------------
'**********CFL Creation*************************
Dim oCFLs As SAPbouiCOM.ChooseFromListCollection
Dim oCFL As SAPbouiCOM.ChooseFromList
Dim oCFLCreationParams As SAPbouiCOM.ChooseFromListCreationParams
ObjForm = objMain.objApplication.Forms.Item(FormUID)
'' Customer EquipMent Card
oCFLs = ObjForm.ChooseFromLists
oCFLCreationParams = objMain.objApplication.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
oCFLCreationParams.ObjectType = "176"
oCFLCreationParams.UniqueID = "CFL_OINS"
oCFL = oCFLs.Add(oCFLCreationParams)
'-------------------------------------------------------------------------------------------------------------------
'********** Adding CFL Textbox *****************
Dim ObjRefItem, oItem As SAPbouiCOM.Item
ObjRefItem = ObjForm.Items.Item("174")
oItem = ObjForm.Items.Add("txtoldSerN", SAPbouiCOM.BoFormItemTypes.it_EDIT)
With oItem
.Top = ObjRefItem.Top + ObjRefItem.Height + 2
.Left = ObjRefItem.Left
.Width = ObjRefItem.Width
.Height = ObjRefItem.Height
.FromPane = 0
.ToPane = 0
.Specific.DataBind.SetBound(True, "OINS", "U_Alt_OldSerNo")
.Specific.ChooseFromListUID = "CFL_OINS"
.Specific.ChooseFromListAlias = "internalSN"
End With
ObjRefItem = ObjForm.Items.Item("168")
oItem = ObjForm.Items.Add("lbloldSerN", SAPbouiCOM.BoFormItemTypes.it_STATIC)
With oItem
.Top = ObjRefItem.Top + ObjRefItem.Height + 2
.Left = ObjRefItem.Left
.Width = ObjRefItem.Width
.Height = ObjRefItem.Height
.FromPane = 0
.ToPane = 0
.LinkTo = "txtoldSerN"
.Specific.Caption = "Old Serial No"
End With
'-------------------------------------------------------------------------------------------------------------------
Case SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST
ObjForm = objMain.objApplication.Forms.Item(FormUID)
Dim objCFLEvent As SAPbouiCOM.ChooseFromListEvent
Dim objDataTable As SAPbouiCOM.DataTable
objCFLEvent = pVal
objDataTable = objCFLEvent.SelectedObjects
If Not objDataTable Is Nothing Then
If objCFLEvent.ChooseFromListUID = "CFL_OINS" Then
Try
ObjForm.Items.Item("txtoldSerN").Specific.Value = objDataTable.GetValue("internalSN", 0)
Catch ex As Exception
End Try
End If
End If
End Select
End If
Catch ex As Exception
objMain.objApplication.StatusBar.SetText("ItemEvent - " + ex.Message)
End Try
End Sub
Thanks,
Ramkumar N
Hi,
Put breakpoint in "If objCFLEvent.ChooseFromListUID = "CFL_OINS" Then"
Then kindly check the value of "objDataTable.GetValue("internalSN", 0)" in msgbox. Also, I much prefer "txtoldSerN.Value" instead of "ObjForm.Items.Item("txtoldSerN").Specific.Value"
Regards,
Bry
User | Count |
---|---|
98 | |
12 | |
10 | |
6 | |
6 | |
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.