Skip to Content
0
May 22, 2014 at 10:55 AM

Problem updating budgets in B1 V9 PL5

34 Views

Hi

I need to write a program to update the budget figures in B1 V9 PL5, they are all manual budgets

I have quickly created some test code which works most of the time but sometimes some of the months figures are not correct, even though they are hardcoded

Not sure if it's a problem with my code or a bug in PL5.

Has anyone got any ideas please ?

Thanks

Andy

BGT = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oBudget)

BGT.GetByKey(1)

BGT.DivisionCode = -1

BGT.TotalAnnualBudgetDebitLoc = 780

BGT.TotalAnnualBudgetDebitSys = 780

For lc = 0 To BGT.Lines.Count - 1

BGT.Lines.SetCurrentLine(lc)

BGT.Lines.BudgetTotDebit = (lc + 1) * 10

BGT.Lines.BudgetSysTotDebit = (lc + 1) * 10

Next lc

'BGT.Lines.BudgetTotDebit = 110

ret = BGT.Update