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. information_schema.columns 学习

    每一个表中的每一列都会在information_schema.columns表中对应一行 1.informaiton_schema.columns 常用列: 1.table_catalog :不管是t ...

  2. mongodb GUI

    官网:http://robomongo.org/ 提供Mac .Windows .Linux三种版本: robomongo界面简洁功能强大人性化:

  3. Web数据采集

    http://blog.csdn.net/pqhdp/article/details/4352769 http://blog.csdn.net/CharlesSimonyi/article/detai ...

  4. Qt 文件搜索(写入文本文件)

    代码无意间在网上找到,下载回来后改了几个格式,编译后经测试可以正常使用,这个个文件搜索的很好的例子,有两种搜索方式:一种是按文件名作为关键字进行搜索,一种是以文档中所包含的关键字进行搜索,贴两张图先: ...

  5. 将窗体显示在 PageControl 上

    var AWinControl:TPageControl; begin AWinControl := PageControl1; if frmAbout = nil then Exit; frmAbo ...

  6. 【转】内核编译时, 到底用make clean, make mrproper还是make distclean(转载)

    原文网址:http://dongyulong.blog.51cto.com/1451604/449470 内核编译时, 到底用make clean, make mrproper还是make distc ...

  7. tr转换或删除字符

    字符处理命令:tr —— 转换或删除字符 逐个字符处理而不是处理单词的tr [OPTION]... SET1 [SET2]    -d: 删除出现在字符集中的所有字符 tr ab AB

  8. NSNotificationCenter 传对象

    [[NSNotificationCenter defaultCenter] postNotificationName:@"postCity" object:pro]; [[NSNo ...

  9. 【技术文档】《算法设计与分析导论》R.C.T.Lee等·第5章 树搜索策略

    计算机中许多问题的解空间可以用一棵树来表示,最优解就在树中的一个分支上,因此,我们在解这类问题时可以采用树搜索策略,最经典的问题包括0/1背包问题.旅行商问题.哈密顿回路问题,还有8数码问题(就是我们 ...

  10. MonoDevelop with Visual Studio to Linux and Mac OSX maintaining a single code base for all platforms.

    Home | Screenshots | Download | Contact | FAQ | Documentation | Development | Search   MonoDevelop i ...