Recently I am using DI API and XML for adding and updating customer data in SAP. In add mode it is working fine but I am facing a problem when I am trying to update the data using XML. The problem is that the values of the fields like UDF filed values which I am not setting in my XML is getting deleted.
I have written the below C# code for the update operation and I am attaching my xml file in the attachment. Please give your suggestion.
SAPbobsCOM.BusinessPartners lCustomer = (SAPbobsCOM.BusinessPartners)_oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oBusinessPartners);
int count = _oCompany.GetXMLelementCount("BPObject.xml");
for (int i = 0; i <= count; i++)
lCustomer = _oCompany.GetBusinessObjectFromXML("BPObject.xml", i);
int add = lCustomer.Update();
string str = _oCompany.GetLastErrorDescription();
Thanks and regards