Skip to Content
0
Former Member
Dec 08, 2008 at 01:08 PM

Table Creation taking a lot of time in SAP 2007...

50 Views

I have an SAP Addon which is created in SAP2005...Right now i changed the code to SAP 2007...But the Problem i am facing is, it takes a lot of time to created the usertabels thorugh SAP 2007 code...Around 5 minutes it takes....But i created the usertables through SAP 2005 less than 2 minutes....I ahve to create 18 usertables thorugh this code....

can anyone help me to solve this issue.. as well as i want to know whether any change is there in codes in SAP 2005 or SAP 2007.for creating Usertables....

My Code:

Private Sub AddUserTable(ByVal Name As String, ByVal Description As String, ByVal Type As SAPbobsCOM.BoUTBTableType)

Try

oUserTablesMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserTables)

If oUserTablesMD.GetByKey(Name) = False Then

oUserTablesMD.TableName = Name

oUserTablesMD.TableDescription = Description

oUserTablesMD.TableType = Type

lRetCode = oUserTablesMD.Add

If lRetCode 0 Then

'oCompany.GetLastError(lRetCode, sErrMsg)

'MsgBox(sErrMsg)

End If

End If

Catch ex As Exception

'pEve_Application.StatusBar.SetText(ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)

Finally

System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserTablesMD)

End Try

End Sub

Waiting for Positive Reply...

Thanks

Hari