Skip to Content
0
Nov 22, 2018 at 07:18 PM

Add Deposit (Object 25) error

89 Views Last edit Nov 26, 2018 at 01:57 PM 2 rev

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