Skip to Content
0
Former Member
Jun 26, 2009 at 12:52 PM

Hoe to Set the Account AccountRecivablePayables.AccountCode

67 Views

I won to set the AccountRecivablePayables.AccountCode in business partner master data

How can I do it with the DI API

This is My Code

I will give an error Code u20135002 and Error Description Invalid Control Account

SAPbobsCOM.BusinessPartners oBP;

oBP = (SAPbobsCOM.BusinessPartners)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oBusinessPartners);

oBP.CardCode = "TEST";

oBP.CardName = "Mal Samanalaya";

oBP.CardType = BoCardTypes.cCustomer;

oBP.AccountRecivablePayables.AccountCode = "140000";

oBP.AccountRecivablePayables.Add();

int err = oBP.Add();

string strErr = "";

if (err != 0)

{

oCompany.GetLastError(out err, out strErr);

MessageBox.Show(strErr);

}