• Oracle EBS-SQL (PO-7):检查异常-非批准的供应商设置供货比例.sql


    select distinct
     msr.sourcing_rule_name            名称
    ,msi.description                          说明
    ,msi.item_type                           类型
    ,msi.inventory_item_status_code 状态
    ,msr.planning_active             计划生效
    ,msro.effective_date             有效日期
    ,msro.disable_date               无效日期
    ,msro.attribute1                    比例月份
    ,decode(msso.source_type,3,'采购来源',2,'制造地点','传送至') 来源类型
    ,pv.vendor_name               供应商名称
    ,pv.segment1                    供应商编码
    ,pvs.vendor_site_code          地址简称
    ,msso.allocation_percent            比例
    ,msso.rank                              优先级
    from mrp.MRP_SOURCING_RULES  msr
        ,mrp.mrp_sr_receipt_org         msro
        ,mrp.mrp_sr_source_org         msso
        ,inv.mtl_system_items_b           msi
        ,po.po_vendors                           pv
        ,po.po_vendor_sites_all             pvs
    where msi.organization_id  = X
      and msi.organization_id  = msr.organization_id
      and msi.segment1 = msr.sourcing_rule_name
      and msr.organization_id  = msro.receipt_organization_id
      and msr.sourcing_rule_id = msro.sourcing_rule_id
      and msro.sr_receipt_id = msso.sr_receipt_id
      and pvs.vendor_site_id = msso.vendor_site_id
      and pvs.vendor_id = pv.vendor_id
      and msso.vendor_id = pv.vendor_id
      and msso.source_type=3    
      and msso.allocation_percent >0   --排除比例为0的选项
      and msro.disable_date is null
      and not exists ( select null from PO.PO_APPROVED_SUPPLIER_LIST avl
                       where avl.owning_organization_id=msi.organization_id
                         and avl.item_id  = msi.inventory_item_id
                         and avl.vendor_site_id = pvs.vendor_site_id)
    order by msr.sourcing_rule_name

  • 相关阅读:
    修改maven远程仓库为阿里的maven仓库(复制)
    Vue下iframe如何实现和父窗口的通信
    Vue在子组件内如何触发父组件的方法
    PhpStorm环境设置Debug
    史上最全的Excel数据编辑处理技巧(转)
    按钮样式
    字符和数字对齐的字体
    使用jquery控制只能输入数字,并且关闭输入法(转)
    Javascript中字符串转换成Date的方法
    MongoDB工具MagicMongoDBTool
  • 原文地址:https://www.cnblogs.com/st-sun/p/3779377.html
Copyright © 2020-2023  润新知