on 2022 Dec 06 5:35 AM
Hi Experts!
For one of our project requirement, we are implementing Inventory Counting service in our application & we are making calls using DIAPI. When we perform the Add operation on Inventory Counting we are getting an error as:
Internal error (-5002) occurred
We are using SAP B1 V10 with respective DIAPI. We able to connect to the SAP B1 instance/server using DIAPI but when performing add we are getting error.
Here is the sample code for Add :
SAPbobsCOM.Company _company = new SAPbobsCOM.Company();
_company.Server = @"ServerURL";
_company.CompanyDB = "CompanyDatabase";
_company.UserName = "username";
_company.Password = "password";
_company.LicenseServer = "licenseServer";
_company.language = (SAPbobsCOM.BoSuppLangs)
Enum.Parse(typeof(SAPbobsCOM.BoSuppLangs), "ln_English_Gb");
_company.DbServerType = (SAPbobsCOM.BoDataServerTypes)
Enum.Parse(typeof(SAPbobsCOM.BoDataServerTypes), "15");
_company.DbUserName = "DBUser";
_company.DbPassword = "DBPassword";
int returnVal = _company.Connect();
SAPbobsCOM.CompanyService oCS = (SAPbobsCOM.CompanyService)_company.GetCompanyService();
SAPbobsCOM.InventoryCountingsService oICS = oCS.GetBusinessService(SAPbobsCOM.ServiceTypes.InventoryCountingsService);
SAPbobsCOM.InventoryCounting oIC = oICS.GetDataInterface(SAPbobsCOM.InventoryCountingsServiceDataInterfaces.icsInventoryCounting);
oIC.FromXMLFile("c:\\Temp\\UserXML.xml");
SAPbobsCOM.InventoryCountingParams oInventoryCountingParams = oICS.Add(oIC);
Please suggest a solution for this error. Thank you in advance!
User | Count |
---|---|
11 | |
3 | |
3 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.