• Oracle EBS-SQL (PO-2):检查当月到货补单的记录数.sql


    SELECT
              DECODE(PLLA.FROM_LINE_ID,'-1','手工','','自动创建') 下达方式,
              rsh.receipt_num                       收据号,
              POV.SEGMENT1                  供应商编号,
              pov.vendor_name               供应商名称,
              poh.segment1                       采购订单,
              pol.line_num                            订单行,
              PTL.LINE_TYPE                         行类型,
              PLLA.CREATION_DATE       订单下达日期,
              PLLA.LAST_UPDATE_DATE 订单更新时间,
              msi.segment1                        物料编码,
              msi.description                      物料描述,
              rcvt.unit_of_measure             计量单位,
              POL.QUANTITY                   订单行数量,
              plla.shipment_num                   发运行,
              PLLA.CLOSED_CODE              发运状态,
              PLLA.QUANTITY                  发运行数量,
              rcvt.quantity                         处理数量,
              DECODE(rcvt.transaction_type,'REJECT','拒绝','RETURN TO RECEIVING','退回至接收','DELIVER','交货','RECEIVE','接收','ACCEPT','接受','TRANSFER','转移','RETURN TO VENDOR','退回至供应商')  类型,
              rcvt.transaction_date 接收日期,
              FU.DESCRIPTION 采购员
    FROM  po.rcv_transactions         rcvt,
              po.rcv_shipment_headers rsh,
              APPLSYS.FND_USER          FU,
              po.po_headers_all           poh,
              po.po_lines_all                 pol,
              inv.mtl_system_items_b   msi,
              inv.MTL_ITEM_LOCATIONS  mil,
              po.po_line_locations_all    PLLA,
              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 PLLA.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 PTL.LANGUAGE = 'ZHS'
        AND PTL.LINE_TYPE_ID = POL.LINE_TYPE_ID
        AND rcvt.transaction_type='RECEIVE'
        AND PLLA.CREATED_BY=FU.USER_ID
        AND PLLA.PO_HEADER_ID=POL.PO_HEADER_ID
        AND PLLA.PO_LINE_ID=POL.PO_LINE_ID
        AND plla.org_id=POH.org_id
        AND PLLA.CREATION_DATE BETWEEN to_date('20**-01-01','yyyy-mm-dd') and to_date('20**-01-31','yyyy-mm-dd')

  • 相关阅读:
    一句SQL实现MYSQL的递归查询
    人生不过一个字【Life is but a word】
    VS2008 如何将Release版本设置可以调试的DEBUG版本
    微软 2018 年第一笔收购:文件存储公司 Avere Systems
    设置系统时间
    OpenVZ安装指南,一种操作系统级别的虚拟化技术
    云平台DevOps实践
    路由(Routing)
    Ubuntu命令
    net mvc中angular
  • 原文地址:https://www.cnblogs.com/st-sun/p/3779264.html
Copyright © 2020-2023  润新知