Skip to Content
0
Former Member
Jan 29, 2014 at 10:53 AM

Could not commit Transation Error

824 Views

Hi,

When i create a Customer Equipment Card through DI API it shows an error message like 'Could Not Commit Transaction'.My .Net code as follows.

Private Function CreateVehicleCard(ByVal ItemCode As String, ByVal chassis As String, ByVal EngineNo As String) As String Try Dim IRetCode As Integer Dim oEquipmentCards As SAPbobsCOM.CustomerEquipmentCards oEquipmentCards = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oCustomerEquipmentCards) With oEquipmentCards .ItemCode = ItemCode .ManufacturerSerialNum = chassis .InternalSerialNum = EngineNo .CustomerCode = My.Settings.CustomerCode IRetCode = .Add() End With If IRetCode <> 0 Then MsgBox(oCompany.GetLastErrorDescription) Return ("") Else Return (oCompany.GetNewObjectKey()) End If Catch MsgBox(Err.Description) Return ("") End Try End Function

How can i solve the error. Pls Help