axapta2009:在特定日期对 inventtrans 求和,按维度过滤
我需要计算在特定日期具有特定物理尺寸 [inventTransPosting.Dimension] 的 InvnetTrans 的总和。即我需要类似的
select sum(CostAmountPosted) //other sums
from InventTrans
where InventTrans.transDate < 3\3\2010
exists join InventTransPosted
where InventTransPosted.dimension[1] == 'XXX'
&& InventTransPosted.inventTransId == inventTrans.inventTransId
&& //other relations
可以使用 InventSum* 类通过 InventDim 过滤 InvenTranses 来计算 InvenTrans 总和。 是否可以通过非发明维度进行过滤? 或者是否有必要更改 InventSum* 类? 现在我没有看到 inventSum* 类可以按维度过滤。也许我错过了一些课程?
I need to calculate sum of InvnetTrans'es that have specific physicial dimensions[inventTransPosting.Dimension] on specific date. I.e. I need analogue of
select sum(CostAmountPosted) //other sums
from InventTrans
where InventTrans.transDate < 3\3\2010
exists join InventTransPosted
where InventTransPosted.dimension[1] == 'XXX'
&& InventTransPosted.inventTransId == inventTrans.inventTransId
&& //other relations
It is possible to calculate InvenTrans sum with InventSum* classes filtering InvenTranses by InventDim.
Is it possible somehow to filter by non inventdim dimensions?
Or it is neccessary to change InventSum* classes?
Right now I don't see that inventSum* classes can filter by Dimensions. Maybe I missed some classes?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
重构您的选择:
在 InventTransPosting 上创建相关索引,将
Dimension[1]
作为第一个索引字段,将TransDate
作为第二个索引字段。Restructure your select:
Make relevant index on InventTransPosting with
Dimension[1]
as first index field andTransDate
as second.看一下
InventOnHand
类。它根据项目 ID 和库存维度(但不是财务维度)等标准对现有发明值进行求和。
InventOnhand
有多种构造函数方法可以将 new 命名为newInventBatch
。Take a look on the
InventOnHand
class.It sums the invent on-hand values based on criteria like item id and inventory dimensions (but not financial dimensions).
There are several constructor methods to
InventOnhand
name new likenewInventBatch
.您可以在
InventTransPosted
表上冗余存储amountPosted
,然后创建相关索引。在现有交易上填充
amountPosted
可能会出现问题。值得吗?
或者您可以使用 BI 工具来制作报告吗?
You could store - redundantly -
amountPosted
onInventTransPosted
table, then make a relevant index.The filling of the
amountPosted
on existing transaction may be problematic.Is it worth it?
Or could you use a BI tool to do your report?