1 PACKAGE OZF_RESALE_PUB AUTHID CURRENT_USER AS
2 /* $Header: ozfprsss.pls 120.5 2011/11/18 10:11:24 bkunjan ship $ */
3 /*#
4 * This package defines the procedures that are required for processing
5 * indirect sales data. It includes the procedure definitions of
6 * Start_Process_Iface and Start_Purge
7 * @rep:scope public
8 * @rep:product OZF
9 * @rep:lifecycle active
10 * @rep:displayname Indirect Sales Data Processing Public API
11 * @rep:businessevent None
12 * @rep:category BUSINESS_ENTITY OZF_INDIRECT_SALES
13 */
14 TYPE resale_util_rec_type IS RECORD(
15 resale_batch_id NUMBER
16 ,resale_line_id NUMBER
17 ,list_header_id NUMBER
18 ,list_line_id NUMBER
19 ,requester_id NUMBER
20 ,discount_type VARCHAR2(30)
21 ,discount_value NUMBER
22 ,accepted_amount NUMBER
23 ,exchange_rate_date DATE
24 ,inventory_item_id NUMBER
25 ,quantity NUMBER
26 ,unit_price NUMBER
27 ,uom_code VARCHAR2(3)
28 ,currency_code VARCHAR2(15)
29 ,attribute_category VARCHAR2(30)
30 ,attribute1 VARCHAR2(150)
31 ,attribute2 VARCHAR2(150)
32 ,attribute3 VARCHAR2(150)
33 ,attribute4 VARCHAR2(150)
34 ,attribute5 VARCHAR2(150)
35 ,attribute6 VARCHAR2(150)
36 ,attribute7 VARCHAR2(150)
37 ,attribute8 VARCHAR2(150)
38 ,attribute9 VARCHAR2(150)
39 ,attribute10 VARCHAR2(150)
40 ,attribute11 VARCHAR2(150)
41 ,attribute12 VARCHAR2(150)
42 ,attribute13 VARCHAR2(150)
43 ,attribute14 VARCHAR2(150)
44 ,attribute15 VARCHAR2(150)
45 );
46
47 ---------------------------------------------------------------------
48 -- PROCEDURE
49 -- Start_Process_Iface
50 --
51 -- PURPOSE
52 -- This procedure to initiate data process of records in resales interface table.
53 --
54 -- PARAMETERS
55 --
56 --
57 -- NOTES
58 ---------------------------------------------------------------------
59 /*#
60 * This procedure starts the indirect sales data processing activity.
61 * @param p_api_version This indicaters the API version number.
62 * @param p_init_msg_list This indicates whether the message stack should be initialized.
63 * @param p_commit Indicates whether to commit within the program.
64 * @param p_validation_level Indicates the validation level.
65 * @param p_resale_batch_id Identifies the resale batch that should be processed.
66 * @param x_return_status This parameter dsiplays the program status.
67 * @param x_msg_data Message returned by the program .
68 * @param x_msg_count Number of mesaages the program returns.
69 * @rep:scope public
70 * @rep:lifecycle active
71 * @rep:displayname Start Process Indirect Sales Data
72 */
73 PROCEDURE Start_Process_Iface (
74 p_api_version IN NUMBER
75 ,p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE
76 ,p_commit IN VARCHAR2 := FND_API.G_FALSE
77 ,p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL
78 ,p_resale_batch_id IN NUMBER
79 ,x_return_status OUT NOCOPY VARCHAR2
80 ,x_msg_data OUT NOCOPY VARCHAR2
81 ,x_msg_count OUT NOCOPY NUMBER
82 );
83
84
85 ---------------------------------------------------------------------
86 -- PROCEDURE
87 -- Start_Payment
88 --
89 -- PURPOSE
90 -- This procedure to initiate payment for a batch.
91 --
92 -- PARAMETERS
93 --
94 --
95 -- NOTES
96 ---------------------------------------------------------------------
97 /*#
98 * This procedure starts the payment processing.
99 * @param p_api_version This is the API version number.
100 * @param p_init_msg_list Indicates whether the message stack should be initialized.
101 * @param p_commit Indicates whether to commit within the program.
102 * @param p_validation_level This parameter indicates the validation level.
103 * @param p_resale_batch_id Identifies the resale batch that should be processed.
104 * @param x_return_status This parameter displays the program status.
105 * @param x_msg_data This parameter is a return message from the program.
106 * @param x_msg_count This is the number of messages the program returns.
107 * @rep:scope public
108 * @rep:lifecycle active
109 * @rep:displayname Start Process Indirect Sales Data
110 */
111 PROCEDURE Start_Payment (
112 p_api_version IN NUMBER
113 ,p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE
114 ,p_commit IN VARCHAR2 := FND_API.G_FALSE
115 ,p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL
116 ,p_resale_batch_id IN NUMBER
117 ,x_return_status OUT NOCOPY VARCHAR2
118 ,x_msg_data OUT NOCOPY VARCHAR2
119 ,x_msg_count OUT NOCOPY NUMBER
120 );
121
122
123 ---------------------------------------------------------------------
124 -- PROCEDURE
125 -- Start_Purge
126 --
127 -- PURPOSE
128 -- Purge the successfully processed records
129 --
130 -- PARAMETERS
131 --
132 -- NOTES
133 --
134 ---------------------------------------------------------------------
135 /*#
136 * This procedure removes the processed and closed indirect sales data from the ozf_resale_lines_int_all interface table.
137 * @param p_api_version API version number.
138 * @param p_init_msg_list This parameter indicates whether to initialize the message stack.
139 * @param p_commit This parameter indicates whether to commit within the program.
140 * @param p_validation_level This parameter indicates the validation level.
141 * @param p_data_source_code This parameter is the data source code of the batches whose line will be removed.
142 * @param x_return_status Program status.
143 * @param x_msg_data Return This parameter is a return message from the program.
144 * @param x_msg_count This indicates the number of messages the program returned.
145 * @rep:scope public
146 * @rep:lifecycle active
147 * @rep:displayname Start Purge Indirect Sales Data
148 */
149 PROCEDURE Start_Purge
150 (
151 p_api_version IN NUMBER
152 ,p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE
153 ,p_commit IN VARCHAR2 := FND_API.G_FALSE
154 ,p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL
155 ,p_data_source_code IN VARCHAR2
156 ,x_return_status OUT NOCOPY VARCHAR2
157 ,x_msg_data OUT NOCOPY VARCHAR2
158 ,x_msg_count OUT NOCOPY NUMBER
159 );
160
161 ---------------------------------------------------------------------
162 -- PROCEDURE
163 -- Create_resale_utilization
164 --
165 -- PURPOSE
166 -- Public API to Create utilizations for Third party accruals.
167 --
168 -- p_resale_util_rec : Resale utilization record
169 -- x_utilization_id : Returns Utilization Identifier
170 --
171 -- NOTES
172 --
173 -- HISTORY
174 -- 10/29/2011 BKUNJAN Created for ER 12985686
175 ---------------------------------------------------------------------
176 /*#
177 * Purpose of this Public API is to create accruals for Third party orders.
178 * @param p_api_version API version number.
179 * @param p_init_msg_list This parameter indicates whether to initialize the message stack.
180 * @param p_commit This parameter indicates whether to commit within the program.
181 * @param p_validation_level This parameter indicates the validation level.
182 * @param p_resale_util_rec This parameter record set holds parameters for creating utilization, The following are the items in this recordset
183 * <br>resale_batch_id - Resale batch identifier of a closed resale batch
184 * <br>resale_line_id - Resale Line identifier
185 * <br>list_header_id - QP list header identifier of the offer
186 * <br>list_line_id - QP List line identifier of the offer
187 * <br>requester_id - User identifier of the requester
188 * <br>discount_type - Discount type, such as %,AMT,NEWPRICE and LUMPSUM
189 * <br>discount_value - Discount value
190 * <br>accepted_amount - Accepted amount to create price adjustment
191 * <br>exchange_rate_date - Exchange rate date
192 * <br>inventory_item_id - Product identifier.This product should be same as product in resale line
193 * <br>quantity - Quantity of the product
194 * <br>unit_price - Unit Price of the product
195 * <br>uom_code - Unit of measurement of the product
196 * <br>currency_code - Currency code, should be same as resale batch currency code.
197 * <br>attribute_category - Attribute Category
198 * <br>attribute1-15 - DFF Attribute values from Column 1 to 15
199 * @param x_return_status Program status.
200 * @param x_msg_data Return This parameter is a return message from the program.
201 * @param x_msg_count This indicates the number of messages the program returned.
202 * @param x_utilization_id Returns utilization Identifier
203 * @rep:scope public
204 * @rep:lifecycle active
205 * @rep:displayname Start Purge Indirect Sales Data
206 */
207 PROCEDURE Create_resale_utilization (
208 p_api_version IN NUMBER
209 , p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE
210 , p_commit IN VARCHAR2 := FND_API.G_FALSE
211 , p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL
212 , p_resale_util_rec IN resale_util_rec_type
213 , x_return_status OUT NOCOPY VARCHAR2
214 , x_msg_data OUT NOCOPY VARCHAR2
215 , x_msg_count OUT NOCOPY NUMBER
216 , x_utilization_id OUT NOCOPY NUMBER
217 );
218
219 END OZF_RESALE_PUB;