PO部分常用table再次总结

po_requisition_headers_all     --请购单头
po_requisition_headers_all     --
请购单行

po_headers_all                        --采购单头

po_lines_all                             --采购单行

RCV_SHIPMENT_LINES                      --点收单行

rcv_shipment_headers                       点收单头(RECEIPT_NUM 点收单号)



po_vendors                              --供应商
po_vendor_sites_all           
     --供应商地址
po_vendor_contacts            
   --供应商联系人

po_distributions_all pod,      --采购单分部                    

po_req_distributions_all prod,  --请购单分部  

po_line_locations_all poll,      --

       --这个表做什么的,还不清楚, 但是如果连接采购单和请购单,必须通过此table


per_people_f                             --
请购者

gl_code_combinations. segment3     —account

hr_locations                                        位置

 

ap_terms_tl                  --付款期限( name)

rcv_transactions        --点收,验收,入库异动( PO , OM共同使用)

gl_daily_conversion_types  --汇率类型表

 

比如,对于一个请购单, 购买的地址不会在请购单的头,而在行,原因是:
一个请购单可以有多个行,每个行可以由不同单位购买,比较灵活.

 

 

采购单找到请购单

通过采购单找到请购单的过程非常麻烦:

 

/* Formatted on 2006/03/30 14:35 (Formatter Plus v 4.8.6 ) */

SELECT pod.req_header_reference_num, prh.segment1

  FROM                                            

       po_headers_all poh,

       po_distributions_all pod,                           

       po_req_distributions_all prod,    

       po_line_locations_all poll,

       po_requisition_lines_all prl,                               

       po_requisition_headers_all prh

WHERE  prh.requisition_header_id = prl.requisition_header_id

   AND prod.requisition_line_id = prl.requisition_line_id

   AND pod.req_distribution_id = prod.distribution_id

   AND poll.line_location_id = pod.line_location_id

   AND poll.po_header_id = poh.po_header_id

   AND poh.segment1 = ''

 

 

涉及几个表相关联, 具体是:

       po_headers_all poh,   -- 采购单头

       po_distributions_all pod,      --采购单分部                    

       po_req_distributions_all prod,  --请购单分部  

       po_line_locations_all poll,      --

       --这个表做什么的,还不清楚, 但是如果连接采购单和请购单,必须通过此table

       po_requisition_lines_all prl,   --请购单行                            

       po_requisition_headers_all prh   --请购单行

 

 

 

三角贸易 PR 对应着 I/O

select prh.segment1, prl.reference_num,  prl.*

 from po_requisition_headers_all prh,

 po_requisition_lines_all prl

 where prl.reference_num=''   -- IO 号码

 and prh.REQUISITION_HEADER_ID=prl.requisition_header_id

 

 

 

 

 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值