Report:一个时间段内有做Receipt动作的PO,以及具体数据

本文档记录了KSFIN请求定制一份包含采购订单(PO)及其相关收货信息的报告的过程。该报告旨在帮助准确预算编制。Kevin已开发并部署了一个名为‘XX_PO_RECEIPT_REPORT’的报告,并在测试服务器上进行了应用。后续应KSFIN的要求,在报告中新增了一列‘POTotalAmount’。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Doc ID: AG0991

Subject: Request from KS FIN to customize a report listing PO and relevant receipt information

Type: Request

Creation Date: 17-Sep-08

Last Revision Date: 22-Sep-08

Status: Open

Owner: Kevin

 

Request

KS FIN needs to customize a report listing PO and relevant receipt information. (Refer to AG0991_01)

Purpose

Purpose is help for budgeting accurately.

Current Practice

 

Solutions

1. [17-Sep-08] Kevin developed the report and named it ‘XX_PO_RECEIPT_REPORT’. (Refer to XX_PO_RECEIPT_REPORT.sql)(Need end of Thomas’s approval)

2. [17-Sep-08] Kevin applied the report on TEST Server (ERPDB) and named it ‘AG PO Receipt Report’. (Refer to AG0991_02) (Need end of Thomas’s approval)

3. [22-Sep-08] KS FIN Zhangling asked us to add a column ‘PO Total Amount’ in the report.

 

 

 

---------------------------------------------------------
-- DEVELOPED by   : Kevin
-- Updated Date : 2008-09-18
---------------------------------------------------------

set feedback off;
set heading on;
set pagesize 30000;
set lines 750;
set verify off;
set echo off;
set feedb off;

col PO_NUM format a20 head 'PO_NUM';
col SUPPLIER format a35 head 'SUPPLIER';
col TERMS format a20 head 'TERMS';
col CURRENCY format a20 head 'CURRENCY';
col ITEM_CODE format a25 head 'ITEM_CODE';
col DESCRIPTION format a80 head 'DESCRIPTION';
col QUANTITY format 999999999999.999 head 'QUANTITY';
col UNIT_PRICE format 999999999999.999 head 'UNIT_PRICE';
col AMOUNT format 999999999999.999 head 'AMOUNT';
col RECEIPT_NUM format a20 head 'RECEIPT_NUM';
col QUANTITY_RECEIVED format 999999999999.999 head 'QUANTITY_RECEIVED';
col AMOUNT_RECEIVED format 999999999999.99999999 head 'AMOUNT_RECEIVED';
col RECEIVED_DATE format a50 head 'RECEIVED_DATE';
select pha.segment1 po_num,
PV.VENDOR_NAME supplier,
at.NAME terms,
pha.currency_code currency,
msb.segment1 item_code,
msb.description description,
pla.quantity quantity,
pla.unit_price unit_price,
pla.quantity*pla.unit_price amount,
rsh.receipt_num receipt_num,
plla.quantity_received quantity_received,
plla.quantity_received*unit_price amount_received,
plla.closed_for_receiving_date received_date
from po_headers_all pha,
     PO_VENDORS PV,
     AP_TERMS AT,
     po_lines_all pla,
     mtl_system_items_b msb,
     po_line_locations_all plla,
     RCV_SHIPMENT_HEADERS rsh,
     RCV_SHIPMENT_LINES rsl
where pha.vendor_id=pv.vendor_id

and pha.org_id=102
and pha.terms_id=at.TERM_ID
and pha.po_header_id=pla.po_header_id
and pla.item_id=msb.inventory_item_id
and msb.organization_id=111
and plla.po_header_id=pha.po_header_id
and plla.po_line_id=pla.po_line_id
and plla.closed_for_receiving_date is not null
and rsh.shipment_header_id=rsl.shipment_header_id
and pla.po_line_id=rsl.po_line_id
and pla.po_header_id=rsl.po_header_id
and pla.item_id=rsl.item_id
and plla.line_location_id=rsl.po_line_location_id
and plla.closed_for_receiving_date >= to_date('&1','dd/mm/yyyy')
and plla.closed_for_receiving_date <= to_date('&2','dd/mm/yyyy')
order by plla.closed_for_receiving_date;

NOTE:Ctrl+A 光标在最后一行的下面,最后一行的最后面以分号结束.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值