1

我正在尝试计算发票在某个时期的余额是多少

BAL = Invoice.AMT - sum(adj.amts). 

调整金额 (adj.amts) 为 MV 并具有相关日期。

因此,我希望能够通过 ACCTG.PERIOD 的提示传递数据。

SUBR('-IFS',SUBR('-LES',ACCTG.PERIOD,REUSE('ADJ.DATES')),'1','')

我也试过

SUBR('-IFS',SUBR('-LES',<<A,ACCTG.PERIOD>>,REUSE('ADJ.DATES')),'1','') 

那没有用。

这不能在一个段落中。

这必须在属性中完成,否则审计会变得很疯狂。而且我必须使用 IFS 和 LES 等通用子程序。

4

1 回答 1

0

If I get what you are saying, I think you can use the WHEN statement with SORT to get what you are after provided your dictionary is properly associated or you can figure out how to associate the Multi-values inline.

SORT FILE WHEN ADJ.DATES LT "YOURDATE" AND ADJ.AMTS GT 0 BREAK.ON @ID TOTAL ADJ.AMTS DET.SUP

This example would sort the contents of FILE which assumes that FILE has 2 multivalue fields call ADJ.DATES and ADJ.AMTS and that they are a Date and Decimal type. It then finds all the associations in each record that meet that criteria and totals ADJ.AMTS for each record. The ID.SUP suppress the details.

Good Luck.

于 2019-08-07T16:10:10.737 回答