1 PACKAGE GMD_QC_SPEC_MATCH AUTHID CURRENT_USER AS
2 /* $Header: GMDQMCHS.pls 120.0 2005/05/26 01:05:11 appldev noship $ */
3
4 -- ==================================================
5 -- Do not use %TYPE so the Pick Lots screen can be sent
6 -- out without QC data model changes.
7 -- Location in match_result_lot_rec is being ignored for now.
8 -- So you can leave it blank.
9 -- Spec Matching should send N for exact match and Y for look_in_other_orgn
10 -- Spec Matching should ignore the qcassy_typ_id. It is used by the Form
11 -- if the user adds assays not on the spec to results.
12 -- Spec Matching should ignore lot_id which is used when procedure is called
13 -- from the results form. Lot would be used if no customer spec was found
14 -- and an item/loc spec had to be searched.
15 -- Spec Matching should ignore order_line, which is the concatenated line
16 -- number shown on an order. This concatenated line is stored on a sample.
17 -- The simple numeric line_number is stored on a spec.
18 -- ==================================================
19
20 TYPE find_cust_spec_rec IS record
21 ( orgn_code VARCHAR2(4)
22 ,whse_code VARCHAR2(4)
23 ,customer_id NUMBER
24 ,item_id NUMBER
25 ,date_effective date
26 ,order_org_id NUMBER
27 ,ship_to_site_id NUMBER
28 ,order_header_id NUMBER
29 ,order_line_id NUMBER
30 ,exact_match VARCHAR2(1)
31 ,look_in_other_orgn VARCHAR2(1)
32 ,order_line VARCHAR2(16)
33 ,lot_id NUMBER
34 ,qcassy_typ_id NUMBER
35 ) ;
36
37 TYPE cust_spec_out_rec IS record
38 ( spec_hdr_id NUMBER
39 ,orgn_code VARCHAR2(4)
40 ,qc_spec_id NUMBER
41 ) ;
42
43 TYPE cust_spec_out_tbl IS TABLE OF cust_spec_out_rec INDEX BY BINARY_INTEGER; --Bug 2798879
44
45 TYPE match_result_lot_rec IS record
46 ( item_id NUMBER -- IN
47 ,lot_id NUMBER -- IN
48 ,whse_code VARCHAR2(4) -- IN
49 ,location VARCHAR2(16) -- IN
50 ,sample_id NUMBER -- OUT
51 ,qc_rec_type VARCHAR2(4) -- OUT
52 ,spec_match_type VARCHAR2(4) -- OUT
53 );
54
55 -- ==================================================
56 -- Currently, Apps says we should have separate IN and OUT parameters.
57 -- So we are declaring two tables, one IN and one OUT, with the same
58 -- record type. If the function finds a customer spec, then the procedure
59 -- needs to find a set of results (given by sample_id) for that spec for
60 -- each lot given.
61 -- ==================================================
62
63 TYPE result_lot_match_tbl IS TABLE OF match_result_lot_rec
64 INDEX BY BINARY_INTEGER;
65
66
67 -- send in orgn_code, cust_id, item_id, order_id (if any), sched ship date
68 -- for Date_effective.
69 -- return spec_hdr_id, orgn_code of spec found
70
71 FUNCTION find_cust_spec ( p_cust_spec IN find_cust_spec_rec)
72 RETURN cust_spec_out_tbl ; --BUG#2798879
73
74 PROCEDURE get_spec_match
75 ( p_spec_hdr_id IN NUMBER
76 , p_lots_in IN result_lot_match_tbl
77 , p_api_version IN NUMBER
78 , p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE
79 , p_results_out OUT NOCOPY result_lot_match_tbl --BUG#4203815
80 , p_return_status OUT NOCOPY VARCHAR2
81 , p_msg_count OUT NOCOPY NUMBER
82 , p_msg_stack OUT NOCOPY VARCHAR2
83 );
84
85
86 END gmd_qc_spec_match;