Skip to Content
0
Former Member
Sep 02, 2009 at 12:20 PM

Error while adding records into master data

25 Views

Error :

No matching records found (ODBC -2028)

I have a mster table with One child table while generating code throgh getnextserialva() fn getting an error mentioned above

i did code like this

If pVal.ItemUID = "1" And pVal.FormMode = "3" Then
                        oDBs_Head.SetValue("Code", 0, getNextSeriesVal("VEDA_FINAL_MSTR"))
                    End If

Function getNextSeriesVal(ByVal udoID As String) As Integer
        Try
            Dim seriesService As SAPbobsCOM.SeriesService
            Dim v_CompanyService As SAPbobsCOM.CompanyService
            Dim objectType As SAPbobsCOM.DocumentTypeParams
            Dim crmSeries As SAPbobsCOM.Series
            v_CompanyService = objMain.objCompany.GetCompanyService
            seriesService = v_CompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.SeriesService)
            objectType = seriesService.GetDataInterface(SAPbobsCOM.SeriesServiceDataInterfaces.ssdiDocumentTypeParams)
            objectType.Document = udoID
            crmSeries = seriesService.GetDefaultSeries(objectType) *Error is coming this line*
            Return crmSeries.NextNumber
        Catch ex As Exception
            objMain.objApplication.StatusBar.SetText(ex.Message)
        End Try

in form data event
Sub FormDataEvent(ByRef BusinessObjectInfo As SAPbouiCOM.BusinessObjectInfo, ByRef BubbleEvent As Boolean)
        Try
            Select Case BusinessObjectInfo.EventType
                Case SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD
                    If BusinessObjectInfo.BeforeAction = True Then
                        oDBs_Head = oForm.DataSources.DBDataSources.Item("@VEDA_FINAL_MSTR")
                        oDBs_Head.SetValue("Code", 0, getNextSeriesVal("VEDA_FINAL_MSTR"))
                    End If
                Case SAPbouiCOM.BoEventTypes.et_FORM_DATA_LOAD
                    If BusinessObjectInfo.ActionSuccess = True Then
                        oDBs_Head = oForm.DataSources.DBDataSources.Item("@VEDA_FINAL_MSTR")
                    End If
            End Select
        Catch ex As Exception
            objMain.objApplication.StatusBar.SetText(ex.Message)
        End Try
    End Sub

What is the problem while generating auto code..???