i have source code as this below :
public void processReport()
{
MK_AgingAPReportContract contract = this.parmDataContract();
VendTable vendTable;
VendTrans vendTrans;
DimensionAttributeValueCombination dimensionAttributeValueCombination;
QueryRun qr = new QueryRun(this.parmQuery());
qr.query().dataSourceTable(tableNum(VendTrans)).addRange(fieldNum(VendTrans,TransDate)).value(SysQuery::range(dateNull(),contract.parmAsOfDate());
while (qr.next())
{
vendTrans = qr.get(tableNum(VendTrans));
tmpAgingAP.InvoiceDate = vendTrans.TransDate;
tmpAgingAP.InvoiceId = vendTrans.Invoice;
tmpAgingAP.AmountMST = vendTrans.AmountMST;
tmpAgingAP.DueDate = vendTrans.DueDate;
tmpAgingAP.BeforeDueDate = (vendTrans.DueDate >= contract.parmAsOfDate()) ? vendTrans.AmountMST : 0;
tmpAgingAP.AfterDueDate = (vendTrans.DueDate >= contract.parmAsOfDate()) ? 0 : vendTrans.AmountMST;
tmpAgingAP.Days = (contract.parmAsOfDate() > vendTrans.DueDate) ? contract.parmAsOfDate() - vendTrans.DueDate : 0;
tmpAgingAP.VendAccount = vendTrans.AccountNum;
tmpAgingAP.Name = vendTrans.vendTableName();
tmpAgingAP.Currency = vendTrans.CurrencyCode;
tmpAgingAP.Description = vendTrans.vendInvoiceJour_RU().Description;
tmpAgingAP.PaymTermId = vendTrans.vendTablePaymTermID();
tmpAgingAP.AmountCur = vendTrans.AmountCur;
tmpAgingAP.SummaryLedgerDimension = vendTrans.vendLedegrAccounts_SLD().SummaryLedgerDimension;
tmpAgingAP.DisplayValue = vendTrans.getDisplayValue(tmpAgingAP.SummaryLedgerDimension);
tmpAgingAP.VendGroup = vendTrans.getVendGroup();
tmpAgingAp.LessThan30 = ((tmpAgingAp.Days >= 1) && (tmpAgingAp.Days < 30)) ? tmpAgingAp.AmountMST : 0;
tmpAgingAp.Between3060 = ((tmpAgingAp.Days >= 30) && (tmpAgingAp.Days < 60)) ? tmpAgingAp.AmountMST : 0;
tmpAgingAp.Between6090 = ((tmpAgingAp.Days >= 60) && (tmpAgingAp.Days < 90)) ? tmpAgingAp.AmountMST : 0;
tmpAgingAp.Over90 = (tmpAgingAp.Days >= 90) ? tmpAgingAp.AmountMST : 0;
tmpAgingAP.insert();
}
}
and then how add addRange() to get DisplayValues field values in DimensionAttributeValueCombination table?
this is relation it :
VendTable ->AccountNum <- VendTrans
VendTrans ->PostingProfile<-VendLedgerAccounts
VendTable ->VendGroup<-->Num<-VendLedgerAccounts
VendLedegrAccounts ->SummaryLedgerDimension<-->RecId<-DimensionAttributeValueCombination
Can help me please friends?
*This post is locked for comments
I have the same question (0)