博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Oracle EBS-SQL (QA-3):检查已检验未入库.sql
阅读量:5881 次
发布时间:2019-06-19

本文共 1805 字,大约阅读时间需要 6 分钟。

DEFINE RECE="%"

  SELECT rsh.receipt_num                                    收据号,
              pov.vendor_name                            供应商名称,
              poh.segment1                                    采购订单,
              decode(POH.AUTHORIZATION_STATUS,'APPROVED','已批准','IN PROCESS','过程中','','未完成') 批准状态,
              pol.line_num                                         订单行,
              PTL.LINE_TYPE                                      行类型,
              decode(POL.closed_code,'OPEN','打开','CLOSED','关闭','FINALLY CLOSED','最后关闭')  栏状态,
              msi.segment1                                     物料编码,
              msi.description                                    物料描述,
              POL.QUANTITY                                       行数量,
              plla.quantity_received                       接收总数量,
              plla.quantity_accepted                            已入库,
              plla.QUANTITY-plla.quantity_received 未接收数量,
              plla.quantity_received-plla.quantity_accepted 接收中数量  ,
              rcvt.unit_of_measure                           计量单位,
              rcvt.quantity                                       入库数量,
              rcvt.transaction_date                           入库日期,
              rcvt.subinventory                                接收子库,
              mil.SEGMENT1                                          货位,
              DECODE(rcvt.transaction_type,'REJECT','拒绝','RETURN TO RECEIVING','退回至接收','DELIVER','交货','RECEIVE','接收','ACCEPT','接受','TRANSFER','转移','RETURN TO VENDOR','退回至供应商')  类型,
              rcvt.comments                                          备注,
              rcvt.RMA_REFERENCE                          红冲号码,
              rcvt.*
    FROM po.rcv_transactions            rcvt,
             po.rcv_shipment_headers    rsh,
             po.po_headers_all              poh,
             po.po_lines_all                    pol,
             po.po_line_locations_all      plla,
             inv.mtl_system_items_b     msi,
             inv.MTL_ITEM_LOCATIONS  mil,
             po.po_vendors                   pov,
             PO.PO_LINE_TYPES_TL       PTL
 WHERE rcvt.organization_id = X                                                       AND
             rcvt.shipment_header_id = rsh.shipment_header_id              AND
             poh.po_header_id = rcvt.po_header_id AND poh.org_id = Y   AND
             pol.po_line_id = rcvt.po_line_id                                           AND
             msi.organization_id = X                                                      AND
             pol.item_id = msi.inventory_item_id                                    AND
             mil.inventory_location_id(+) = rcvt.locator_id                       AND
             rsh.vendor_id = pov.vendor_id                                            AND
             rsh.receipt_num LIKE '&RECE'                                              AND
             PTL.LANGUAGE = 'ZHS'                                                       AND
             PTL.LINE_TYPE_ID = POL.LINE_TYPE_ID                               AND
             plla.quantity_received >0                                                     AND
             plla.quantity_received-plla.quantity_accepted >rcvt.quantity   AND
             pOL.po_line_id = plla.po_line_id                                           AND
             pOH.org_id = plla.org_id                                                      AND
        --  poh.segment1 ='20**010001'                                               AND
             rcvt.transaction_type ='DELIVER'                              
         ORDER BY
                   rsh.receipt_num

转载于:https://www.cnblogs.com/st-sun/p/3782117.html

你可能感兴趣的文章
Visual C# 2010入门经典》一1.4 编写第一个程序
查看>>
《HTML5 canvas开发详解(第2版)》——2.6 在画布上合成
查看>>
《OpenGL ES 3.x游戏开发(下卷)》一2.4 展翅飞翔的雄鹰
查看>>
《敏捷制造——敏捷集成基础结构设计》——2.2 敏捷企业集成基础结构建模技术...
查看>>
史上最复杂的验证邮件地址的正则表达式
查看>>
《Unity 4 3D开发实战详解》一导读
查看>>
工行数据中心高级经理 李雁南:接口冒烟测试方法
查看>>
GraphQL-Java用来向前端返回json数据
查看>>
Cloud and the Era of AR/VR Technology: What's Next
查看>>
我们为什么需要Greenplum?
查看>>
jsoup (网页获取与解析)
查看>>
【玩转数据系列十】利用阿里云机器学习在深度学习框架下实现智能图片分类...
查看>>
解决之道:从互联网安全到IoT安全,如何关上潘多拉魔盒?
查看>>
Activity过渡动画
查看>>
Android 四种常见的线程池
查看>>
【阿里云资讯】阿里云Serverless产品函数服务(Function Compute)预计年底发布
查看>>
Spark Shuffle Write阶段磁盘文件分析
查看>>
apt-get install nginx
查看>>
利用HAProxy取代nginx代理activemq
查看>>
函数中分配内存的问题
查看>>