1 PACKAGE OE_ORDER_IMPORT_INTEROP_PUB AUTHID CURRENT_USER AS
2 /* $Header: OEXPIMIS.pls 120.0.12010000.1 2008/07/25 07:53:04 appldev ship $ */
3
4 -- Start of Comments
5 -- API name OE_ORDER_IMPORT_INTEROP_PUB
6 -- Type Private
7 -- Function
8 -- Pre-reqs
9 -- Parameters
10 -- Version Current version = 1.0
11 -- Initial version = 1.0
12 -- Notes
13 -- End of Comments
14
15 G_PKG_NAME VARCHAR2(30) := 'OE_ORDER_IMPORT_INTEROP_PUB';
16
17 -- Line_Id record type
18 TYPE LineId_Rec_Type IS RECORD
19 ( line_id NUMBER
20 );
21
22 TYPE LineId_Tbl_Type IS TABLE OF LineId_Rec_Type
23 INDEX BY BINARY_INTEGER;
24
25 -- Header_Id record type
26 TYPE HeaderId_Rec_Type IS RECORD
27 ( header_id NUMBER
28 );
29
30 TYPE HeaderId_Tbl_Type IS TABLE OF HeaderId_Rec_Type
31 INDEX BY BINARY_INTEGER;
32
33 /* ------------------------------------------------------------------
34 Function: Get_Open_Qty
35 ------------------------------------------------------------------
36 This accepts order source id, original system document reference and
37 original system line reference and returns the total open quantity.
38 ------------------------------------------------------------------
39 */
40 FUNCTION Get_Open_Qty (
41 p_order_source_id IN NUMBER
42 ,p_orig_sys_document_ref IN VARCHAR2
43 ,p_orig_sys_line_ref IN VARCHAR2
44 )
45 RETURN NUMBER;
46 --PRAGMA RESTRICT_REFERENCES(Get_Open_Qty, WNDS,WNPS);
47
48
49 /* ------------------------------------------------------------------
50 Function: Get_Shipped_Qty
51 ------------------------------------------------------------------
52 This accepts order source id, original system document reference and
53 original system line reference and returns the total shipped quantity.
54 ------------------------------------------------------------------
55 */
56 FUNCTION Get_Shipped_Qty (
57 p_order_source_id IN NUMBER
58 ,p_orig_sys_document_ref IN VARCHAR2
59 ,p_orig_sys_line_ref IN VARCHAR2
60 )
61 RETURN NUMBER;
62 --PRAGMA RESTRICT_REFERENCES(Get_Shipped_Qty, WNDS,WNPS);
63
64
65 /* ------------------------------------------------------------------
66 Function: Get_Cancelled_Qty
67 ------------------------------------------------------------------
68 This accepts order source id, original system document reference and
69 original system line reference and returns the total cancelled quantity.
70 ------------------------------------------------------------------
71 */
72 FUNCTION Get_Cancelled_Qty (
73 p_order_source_id IN NUMBER
74 ,p_orig_sys_document_ref IN VARCHAR2
75 ,p_orig_sys_line_ref IN VARCHAR2
76 )
77 RETURN NUMBER;
78 --PRAGMA RESTRICT_REFERENCES(Get_Cancelled_Qty, WNDS,WNPS);
79
80
81 /* ------------------------------------------------------------------
82 Function: Get_Order_Number
83 ------------------------------------------------------------------
84 This accepts Order Source Id, Original System Reference and
85 Original System Line Reference and returns the corresponding
86 Order Number.
87 ------------------------------------------------------------------
88 */
89 FUNCTION Get_Order_Number (
90 p_order_source_id IN NUMBER
91 ,p_orig_sys_document_ref IN VARCHAR2
92 ,p_orig_sys_line_ref IN VARCHAR2
93 )
94 RETURN NUMBER;
95 --PRAGMA RESTRICT_REFERENCES(Get_Order_Number, WNDS,WNPS);
96
97
98 /* ------------------------------------------------------------------
99 Function: Get_Header_Id
100 ------------------------------------------------------------------
101 This accepts a Requisition Header Id and returns the corresponding
102 Order Header Id.
103
104 p_type='S' will get it from so_headers/oe_order_headers table and
105 ='D' will get it from so_drop_ship_sources/oe_drop_ship_sources
106 ------------------------------------------------------------------
107 */
108 FUNCTION Get_Header_Id (
109 p_order_source_id IN NUMBER
110 ,p_orig_sys_document_ref IN VARCHAR2
111 ,p_requisition_header_id IN NUMBER
112 ,p_type IN VARCHAR2
113 ,p_requisition_line_id IN NUMBER DEFAULT NULL
114 )
115 RETURN NUMBER;
116 --PRAGMA RESTRICT_REFERENCES(Get_Header_Id, WNDS,WNPS);
117
118
119 /* ------------------------------------------------------------------
120 Function: Get_Req_Header_Id
121 ------------------------------------------------------------------
122 This accepts a Order Header Id and returns the corresponding
123 Requisition Header Id.
124
125 p_type='S' will get it from so_headers/oe_order_headers table and
126 ='D' will get it from so_drop_ship_sources/oe_drop_ship_sources
127 ------------------------------------------------------------------
128 */
129 FUNCTION Get_Req_Header_Id (
130 p_header_id IN NUMBER
131 ,p_type IN VARCHAR2
132 )
133 RETURN NUMBER;
134
135 --PRAGMA RESTRICT_REFERENCES(Get_Req_Header_Id, WNDS,WNPS);
136
137 PROCEDURE Get_Line_Id (
138 p_order_source_id IN NUMBER := 10
139 ,p_orig_sys_document_ref IN VARCHAR2
140 ,p_requisition_header_id IN NUMBER
141 ,p_line_num IN VARCHAR2 := NULL
142 ,p_requisition_line_id IN NUMBER
143 ,x_line_id_tbl OUT NOCOPY /* file.sql.39 change */ LineId_Tbl_Type
144 ,x_return_status OUT NOCOPY /* file.sql.39 change */ VARCHAR2
145 );
146
147
148 /*Bug2770121*/
149 /* ------------------------------------------------------------------
150 Procedure: Get_Requisition_Header_Ids
151 ------------------------------------------------------------------
152 This accepts a Order Header Id and returns the corresponding
153 Requisition Header Ids associated with the drop ship header_id
154 ------------------------------------------------------------------
155 */
156
157 Procedure Get_Requisition_Header_Ids (
158 p_header_id IN NUMBER
159 ,x_req_header_id_tbl OUT NOCOPY /* file.sql.39 change */ HeaderId_Tbl_Type
160 );
161
162 END OE_ORDER_IMPORT_INTEROP_PUB;