вы посмотрите есть ли у вас в vendTrans пустые PostingProfile
а еще можно попробовать так
X++:
VendTrans checkVendTrans()
{
VendLedgerAccounts vendLedgerAccounts;
;
while select vendTrans
where vendTrans.TransDate <= toDate
outer join SumAccount from vendLedgerAccounts1
where vendLedgerAccounts1.PostingProfile == vendTrans.PostingProfile
&& vendLedgerAccounts1.AccountCode == TableGroupAll::Table
&& vendLedgerAccounts1.Num == vendTrans.AccountNum
outer join SumAccount from vendLedgerAccounts2
where vendLedgerAccounts2.PostingProfile == vendTrans.PostingProfile
&& vendLedgerAccounts2.AccountCode == TableGroupAll::GroupId
&& vendLedgerAccounts2.Num == VendTable::find(vendTrans.AccountNum).VendGroup
outer join SumAccount from vendLedgerAccounts3
where vendLedgerAccounts3.PostingProfile == vendTrans.PostingProfile
&& vendLedgerAccounts3.AccountCode == TableGroupAll::All
&& vendLedgerAccounts3.SumAccount == accountNum;
{
....
}
}
но так я и сам не пробовал
думаю Аксапта не потянет