select distinct
         msi.segment1                                               项目
        ,msi.description                                             描述
        ,msi.primary_unit_of_measure                        单位
        ,decode(pla.line_type_id,'1','物货','1000','估价') 类型
        ,pla.unit_price                                       报价单价格
        ,cot.item_cost                                                成本
        ,(pla.unit_price - cot.item_cost)                       差异
        ,Trunc((pla.unit_price - cot.item_cost)/cot.item_cost,4)*100||'%'  差异百分比
    -- ,pla.creation_date                            报价单新建日期
    -- ,pla.last_update_date                       报价单更新日期
     --,cot.creation_date                               成本新建日期
    -- ,cot.last_update_date                          成本更新日期
from po.po_headers_all            pha
       ,po.po_lines_all                 pla
       ,bom.cst_item_costs          cot
       ,inv.mtl_system_items_b  msi
where
        pha.po_header_id = pla.po_header_id
  and msi.inventory_item_id = pla.item_id(+)
  and pha.type_lookup_code ='QUOTATION'
  and msi.inventory_item_id = cot.inventory_item_id(+)
  and msi.organization_id = cot.organization_id(+)
  and cot.cost_type_id = 1
  and cot.item_cost <> 0
  and nvl(trunc(pla.unit_price,4),-1) <> nvl(Trunc(cot.item_cost, 4),-1)
  and pla.item_id = cot.inventory_item_id
  and msi.organization_id in(X,Y)
  and abs((Trunc((pla.unit_price - cot.item_cost)/cot.item_cost,4)*100)) >= 20
order by msi.segment1

Oracle EBS-SQL (PO-14):检查报价单与成本对比.sql的更多相关文章

  1. Oracle EBS 隐藏帮助-诊断-检查

  2. Oracle EBS DBA常用SQL - 安装/补丁【Z】

    Oracle EBS DBA常用SQL - 安装/补丁 检查应用补丁有没有安装:select bug_number,last_update_date from ad_bugs where bug_nu ...

  3. 转:oracle ebs po模块一揽子采购协议小结

    转自:http://yedward.net/?id=193 oracle ebs po模块一揽子采购协议小结 本文总结oracle ebs采购订单(po)模块一揽子采购协议的相关知识,总结如下: 1. ...

  4. Oracle EBS中分类账和法人实体 的关系(有sql语句实例)

    Oracle EBS中分类账和法人实体 的关系(有sql语句实例) 2012-12-06 16:05 2822人阅读 评论(0) 收藏 举报  分类: Oracle EBS(12)  Oracle数据 ...

  5. Oracle EBS R12经验谈(二)

    作者: jianping.ni    时间: 2009-2-13 12:52     标题: Oracle EBS R12经验谈(二) OAF页面:银行帐户开户人LOV值列表无值    在输入 应付超 ...

  6. Oracle EBS应用笔记整理 (转自IT++ flyingkite)

    ***************************************************** Author: Flyingkite Blog:   http://space.itpub. ...

  7. Oracle EBS R12 (12.1.3) Installation Linux(64 bit)

    Oracle EBS R12 (12.1.3) Installation Linux(64 bit) Contents Objective. 3 1 Download & Unzip. 3 D ...

  8. [转]oracle EBS 基础100问

    from:http://www.cnblogs.com/xiaoL/p/3593691.html  http://f.dataguru.cn/thread-51057-1-1.html 1001 OR ...

  9. Oracle EBS R12 WIP Component Issue&Return Process

    oracleassemblytransactionscomponentsjobsreference 目录(?)[-] 定义BOM 定义Routing 定义WIP Discrete Job 发料 Mat ...

随机推荐

  1. Win7网络检测 WindowsAPICodePack

    原文:http://www.cnblogs.com/yincheng01/archive/2010/05/30/2213234.html 在Windows7操作系统下,支持的网络类型越来越复杂,微软提 ...

  2. C++----练习--while求和

    1.完成1+2+3+...+99+100 #include<iostream> int main() { std::cout<<"本程序完成1 + 2 + 3 ... ...

  3. linux搭建svn版本管理器

    安装SVN [root@localhost modules]#yum install subversion 验证安装 检验已经安装的SVN版本信息[root@localhost modules]# s ...

  4. 系统service

    Context.TELEPHONY_SERVICE TelephonyManager tManager = (TelephonyManager)getSystemService(Context.TEL ...

  5. USB设备类型代码(class类型)

    Base Class E0h (Wireless Controller) This base class is defined for devices that are Wireless contro ...

  6. ArcGIS API for Silverlight中专题地图的实现浅析

    原文http://www.gisall.com/html/32/7232-2418.html 专题地图是突出表现特定主题或者属性的地图.常见专题地图类型有唯一值渲染,分类渲染,柱状图,饼状图,点密度图 ...

  7. Xcopy参数介绍

    DOS批处理命令,永远是不朽的命令,不仅功能强大,同时,速度也是最快的!但是,很多新手学习计算机,都已经遗忘了本不该忘记的批处理命令. 我们不可数典忘祖,该学习的还是要学习,不该忘记的还是不能忘记,尤 ...

  8. python手记(44)

    #!/usr/bin/env python # -*- coding: utf-8 -*- #http://blog.csdn.net/myhaspl #code:myhaspl@qq.com imp ...

  9. HTML5 Canvas绘图系列之一:圆弧等基础图形的实现

    之前的一个微信项目已经要结项了,最近整理一下项目中使用较多的canvas画图方面的知识吧,打算写个3,4篇的样子.本篇主要介绍基础操作和弧线画法. 之后再写一下趋势图,直方图,文本图像处理的. 言归正 ...

  10. HDU-1016-素数环

    /* 将1-n个数放在环中,保证相邻的两个数的和是素数 第一个数字永远是1 就这两个约束条件 第一个难点是计算素数: 参考文献: http://c.biancheng.net/cpp/html/254 ...