cancel
Showing results for 
Search instead for 
Did you mean: 

Bp Master fields are overridden by blank values when updating through DI API

former_member591057
Participant
0 Kudos

Hi All,

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

Utpal Maity

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

former_member591057
Participant
0 Kudos

Hi Rajendran,

Sorry for late reply. The name of the UDF is U_Website and it is alphanumeric type.

Thanks and Regards

Utpal