Showing results for 
Search instead for 
Did you mean: 

Add Deposit (Object 25) error

0 Kudos

Hello everyone

I'm having a problem and I found the same question in the forum but no answer. When I try to insert a Deposit where the AccountType is a business partner the DI API returns: "specify a branch that is not disabled in JDT1".

SAPbobsCOM.CompanyService companyService = oCompany.GetCompanyService();
SAPbobsCOM.DepositsService dpService = (SAPbobsCOM.DepositsService)companyService.GetBusinessService(SAPbobsCOM.ServiceTypes.DepositsService);
SAPbobsCOM.Deposit dpsAddCreditCard = dpService.GetDataInterface(SAPbobsCOM.DepositsServiceDataInterfaces.dsDeposit);
SAPbobsCOM.DepositParams dpParams;
SAPbobsCOM.CreditLines odepositLines = dpsAddCreditCard.Credits;
SAPbobsCOM.CreditLine odepositLine;

dpsAddCreditCard.BPLID = 1; //(Branch active)

dpsAddCreditCard.DepositDate = DateTime.Now;
dpsAddCreditCard.DepositType = SAPbobsCOM.BoDepositTypeEnum.dtCredit;
dpsAddCreditCard.ReconcileAfterDeposit = SAPbobsCOM.BoYesNoEnum.tNO;

dpsAddCreditCard.DepositAccountType = SAPbobsCOM.BoDepositAccountTypeEnum.datBusinessPartner;
dpsAddCreditCard.DepositAccount = _CardCode; 

odepositLine = odepositLines.Add();
odepositLine.AbsId = 999;

dpParams = dpService.AddDeposit(dpsAddCreditCard);

* All business partners are linked to branch

* SAP 9.3 PL 5

Accepted Solutions (0)

Answers (0)