查询物料单位PAC成本

select cpp.period_name 期间名称, ccga.organization_id 组织ID, ood.ORGANIZATION_CODE 组织代码, OOD.ORGANIZATION_NAME 组织名称, msib.inventory_item_id 物料ID, msib.segment1 物料编码, msib.description 物料名称, msib.primary_uom_code 单位, cppb.txn_category 类型, cppb.txn_category_qty 数量, round(decode(cppb.txn_category_qty, 0, 0,cppb.txn_category_value / cppb.txn_category_qty),5) 单位成本, round(cppb.txn_category_value,2) 金额, cppb.period_quantity 期间数量, cppb.periodic_cost 期间成本, round(cppb.period_balance,2) 期间金额, round(cppb.variance_amount,2) 差异 from cst_pac_period_balances cppb, mtl_system_items_b msib, cst_pac_periods cpp, cst_cost_groups ccg, cst_cost_group_assignments ccga, org_organization_definitions ood where cppb.inventory_item_id = msib.inventory_item_id and msib.organization_id = ccga.organization_id and cpp.period_name = '&period_name' and ood.ORGANIZATION_CODE=nvl('&organization_code',ood.ORGANIZATION_CODE) and msib.segment1='&item_code' and ood.OPERATING_UNIT=nvl('&ou_id',ood.OPERATING_UNIT) and cpp.pac_period_id = cppb.pac_period_id and ccg.cost_group_id = cppb.cost_group_id and ccg.cost_group_id = ccga.cost_group_id and ood.ORGANIZATION_ID = ccga.organization_id;

转载于:https://www.cnblogs.com/lanminghuai/p/11239917.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值