Oracle EBS-SQL (PO-14):检查报价单与成本对比.sql
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的更多相关文章
- Oracle EBS 隐藏帮助-诊断-检查
- Oracle EBS DBA常用SQL - 安装/补丁【Z】
Oracle EBS DBA常用SQL - 安装/补丁 检查应用补丁有没有安装:select bug_number,last_update_date from ad_bugs where bug_nu ...
- 转:oracle ebs po模块一揽子采购协议小结
转自:http://yedward.net/?id=193 oracle ebs po模块一揽子采购协议小结 本文总结oracle ebs采购订单(po)模块一揽子采购协议的相关知识,总结如下: 1. ...
- Oracle EBS中分类账和法人实体 的关系(有sql语句实例)
Oracle EBS中分类账和法人实体 的关系(有sql语句实例) 2012-12-06 16:05 2822人阅读 评论(0) 收藏 举报 分类: Oracle EBS(12) Oracle数据 ...
- Oracle EBS R12经验谈(二)
作者: jianping.ni 时间: 2009-2-13 12:52 标题: Oracle EBS R12经验谈(二) OAF页面:银行帐户开户人LOV值列表无值 在输入 应付超 ...
- Oracle EBS应用笔记整理 (转自IT++ flyingkite)
***************************************************** Author: Flyingkite Blog: http://space.itpub. ...
- 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 ...
- [转]oracle EBS 基础100问
from:http://www.cnblogs.com/xiaoL/p/3593691.html http://f.dataguru.cn/thread-51057-1-1.html 1001 OR ...
- Oracle EBS R12 WIP Component Issue&Return Process
oracleassemblytransactionscomponentsjobsreference 目录(?)[-] 定义BOM 定义Routing 定义WIP Discrete Job 发料 Mat ...
随机推荐
- Django auth 登陆后页面跳转至/account/profile,修改跳转至其他页面
这几天在学习django,django功能很强大,自带的auth,基本可以满足用户注册登陆登出,简单的用户注册登陆系统使用django auth足矣.当然也不是拿来就能用的,需要自己写登陆页面的模板, ...
- basename $0的用法
basename 从文件名中去掉路径信息, 只打印出文件名. 结构 basename $0 可以让脚本知道它自己的名字, 也就是, 它被调用的名字. 可以用来显示用法信息, 比如如果你调用脚本的时候缺 ...
- phalcon
phalcon 代码内在sql 内用Ad去取数据库内的ad表. osx上没问题, centos报找不到表. 应该是centos上mysql区分大小写,可改写mysql的配置.
- logstash grok 解析Nginx
log_format main '$remote_addr [$time_local] "$request" ' '$request_body $status $body_byte ...
- UESTC_Sea Base Exploration CDOJ 409
When the scientists explore the sea base, they use a kind of auto mobile robot, which has the missio ...
- HDU 3308 LCIS(线段树单点更新区间合并)
LCIS Given n integers. You have two operations: U A B: replace the Ath number by B. (index counting ...
- C:\Program Files (x86)\Common Files\microsoft shared\TextTemplating\11.0
Generating Files with the TextTransform Utility \Program Files\Common Files\Microsoft Shared\TextTem ...
- Impala 4、Impala JDBC
• 配置: – impala.driver=org.apache.hive.jdbc.HiveDriver – impala.url=jdbc:hive2://node2:21050/;auth=no ...
- Calculation(dfs+状压dp)
Problem 1608 - Calculation Time Limit: 500MS Memory Limit: 65536KB Total Submit: 311 Accepted: ...
- UVa 836 - Largest Submatrix
题目:给你一个n*n的01矩阵,求里面最大的1组成的矩形的米娜及. 分析:dp.单调队列.UVa 1330同题,仅仅是输入格式变了. 我们将问题分解成最大矩形.即求解以k行为底边的图形中的最大矩形.然 ...