cancel
Showing results for 
Search instead for 
Did you mean: 

Adding Customer Equipment Card CFL in Customer Equipment Card Screen

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Can you elaborate more about your issue.

Regards,

Bry

Blog: http://www.sap-tips-tricks.com/

Former Member
0 Kudos

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

Former Member
0 Kudos

Kindly post your source code.

Regards,

Bry

Blog: http://www.sap-tips-tricks.com/

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Blog: http://www.sap-tips-tricks.com/

Former Member
0 Kudos

Hi Bryan,

I had did this already, in that case also it was not working fine..

I am guessing that SAP CFL is not working properly in the Case when CFL object Type and Form Object Type was same.

But I am not sure , I need to know wheather I am guessing correct or not.

Thanks,

Ramkumar