PO_从PO追溯PR的方式和表(分析)

2014-06-03 Created By BaoXinjian

一、汇总


从PR单回溯PO单的所需的方式和经过的表

1. 页面中从PO追溯PR的方式 

    (1). PO Header 及 Line 

    (2). PO Shipment 

    (3). PO Distribution

2. 通过SQL查询

     (1).汇总

     (2).各条追溯

 

二、分步解析


1. 页面中从PO追溯PR的方式 

    (1). PO Header 及 Line  

        

    (2). PO Shipment

        

    (3). PO Distribution

        

 

2. 通过SQL查询

    (1).汇总

        

    (2).各条追溯

 1         SELECT po_header_id
 2 
 3           FROM po_headers_all
 4 
 5          WHERE segment1 = '6050'
 6 
 7  
 8 
 9         SELECT po_line_id
10 
11           FROM po_lines_all
12 
13          WHERE po_header_id = 110369
14 
15  
16 
17         SELECT line_location_id
18 
19           FROM po_line_locations_all
20 
21          WHERE po_line_id = 173300
22 
23  
24 
25         SELECT req_distribution_id
26 
27           FROM po_distributions_all
28 
29          WHERE line_location_id = 264435
30 
31  
32 
33         SELECT requisition_line_id
34 
35           FROM po_req_distributions_all
36 
37          WHERE distribution_id = 206943
38 
39  
40 
41         SELECT requisition_header_id
42 
43          FROM po_requisition_lines_all
44 
45         WHERE requisition_line_id = 208424
46 
47  
48 
49         SELECT segment1
50 
51          FROM po_requisition_headers_all
52 
53        WHERE requisition_header_id = 181214
54 
55  
56 
57         SELECT pha. po_header_id,
58 
59                pla .po_line_id ,
60 
61                plla .line_location_id ,
62 
63                pda .REQ_DISTRIBUTION_ID ,
64 
65                prda .distribution_id ,
66 
67                prla .requisition_line_id ,
68 
69                prha .requisition_header_id
70 
71           FROM po_headers_all pha ,
72 
73                po_lines_all pla ,
74 
75                po_line_locations_all plla ,
76 
77                po_distributions_all pda ,
78 
79                po_req_distributions_all prda ,
80 
81                po_requisition_lines_all prla ,
82 
83                po_requisition_headers_all prha
84 
85         WHERE pha .po_header_id = pla .po_header_id (+)
86 
87           AND pla.po_line_id = plla.po_line_id(+)
88 
89           AND plla.line_location_id = pda .line_location_id (+)
90 
91           AND pda.req_distribution_id = prda .distribution_id (+)
92 
93           AND prda.requisition_line_id = prla .requisition_line_id (+)
94 
95           AND prla.requisition_header_id = prha .requisition_header_id (+)
96 
97           AND pha.segment1 = '6050'

 

Thanks and Regards

 

posted on 2014-06-03 20:33  东方瀚海  阅读(1352)  评论(0编辑  收藏  举报