1、--采购到入库所经历的表--0.请购单--创建请购单方式有--a.从外挂系统导入请购的接口表PO_REQUISITIONS_INTERFACE_ALL,并允许请求(名称:导入申请)select * from po_requisitions_interface_all where interface_source_code = 'TEST KHJ';--b.在系统中创建请购单(路径:PO/申请/申请)--请购单头信息select prh.requisition_header_id, prh.authorization_status --未审批时为I
2、NCOMPLETE,审批完后为 from po_requisition_headers_all prh where prh.segment1 = '600000' and prh.type_lookup_code = 'PURCHASE';--请购单行信息select prl.requisition_line_id, prl.* from po_requisition_lines_all prl where prl.requisition_header_id in (select prh.requisit
3、ion_header_id from po_requisition_headers_all prh where prh.segment1 = '600000' and prh.type_lookup_code = 'PURCHASE');--请购单分配行select * from po_req_distributions_all prda where prda.requisition_line_id in (select
4、prl.requisition_line_id from po_requisition_lines_all prl where prl.requisition_header_id in (select prh.requisition_header_id from po_requisition_headers_all prh
5、 where prh.segment1 = '600000' and prh.type_lookup_code = 'PURCHASE'));--1.采购订单的创建(路径:PO/采购订单/采购订单)--po_headers_all 采购订单头表select pha.po_header_id, pha.segment1, pha.agent_id, pha.type_lookup_code, --
7、t_po_status(pha.po_header_id) --刚下完采购单,未审批时,po状态为未完成,审批后,状态为批准 from po_headers_all pha where segment1 = 300446; --采购单号码--po_lines_all 采购订单行表select pla.po_line_id, pla.line_type_id from po_lines_all pla where po_header_id = (select po_header_id from po_headers_all