1 PACKAGE BODY PO_REQ_DISTRIBUTIONS_PKG2 as
2 /* $Header: POXRID2B.pls 120.2.12020000.2 2013/02/10 19:33:28 vegajula ship $ */
3 g_fnd_debug CONSTANT VARCHAR2(1) := NVL(FND_PROFILE.VALUE('AFLOG_ENABLED'),'N');
4
5 c_log_head CONSTANT VARCHAR2(35) := 'po.plsql.PO_REQ_DISTRIBUTIONS_PKG2.';
6
7 PROCEDURE Lock_Row(X_Rowid VARCHAR2,
8 X_Distribution_Id NUMBER,
9 X_Requisition_Line_Id NUMBER,
10 X_Set_Of_Books_Id NUMBER,
11 X_Code_Combination_Id NUMBER,
12 X_Req_Line_Quantity NUMBER,
13 X_Req_Line_Amount NUMBER, -- <SERVICES FPJ>
14 X_Encumbered_Flag VARCHAR2,
15 X_Gl_Encumbered_Date DATE,
16 X_Gl_Encumbered_Period_Name VARCHAR2,
17 X_Gl_Cancelled_Date DATE,
18 X_Failed_Funds_Lookup_Code VARCHAR2,
19 X_Encumbered_Amount NUMBER,
20 X_Budget_Account_Id NUMBER,
21 X_Accrual_Account_Id NUMBER,
22 X_Variance_Account_Id NUMBER,
23 X_Prevent_Encumbrance_Flag VARCHAR2,
24 X_Attribute_Category VARCHAR2,
25 X_Attribute1 VARCHAR2,
26 X_Attribute2 VARCHAR2,
27 X_Attribute3 VARCHAR2,
28 X_Attribute4 VARCHAR2,
29 X_Attribute5 VARCHAR2,
30 X_Attribute6 VARCHAR2,
31 X_Attribute7 VARCHAR2,
32 X_Attribute8 VARCHAR2,
33 X_Attribute9 VARCHAR2,
34 X_Attribute10 VARCHAR2,
35 X_Attribute11 VARCHAR2,
36 X_Attribute12 VARCHAR2,
37 X_Attribute13 VARCHAR2,
38 X_Attribute14 VARCHAR2,
39 X_Attribute15 VARCHAR2,
40 X_Ussgl_Transaction_Code VARCHAR2,
41 X_Government_Context VARCHAR2,
42 X_Project_Id NUMBER,
43 X_Task_Id NUMBER,
44 X_Expenditure_Type VARCHAR2,
45 X_Project_Accounting_Context VARCHAR2,
46 X_Expenditure_Organization_Id NUMBER,
47 X_Gl_Closed_Date DATE,
48 X_Source_Req_Distribution_Id NUMBER,
49 X_Distribution_Num NUMBER,
50 X_Project_Related_Flag VARCHAR2,
51 X_Expenditure_Item_Date DATE,
52 X_End_Item_Unit_Number VARCHAR2 DEFAULT NULL,
53 X_Recovery_Rate NUMBER,
54 X_Tax_Recovery_Override_Flag VARCHAR2
55
56 ) IS
57 CURSOR C IS
58 SELECT *
59 FROM PO_REQ_DISTRIBUTIONS
60 WHERE rowid = X_Rowid
61 FOR UPDATE of Distribution_Id NOWAIT;
62 Recinfo C%ROWTYPE;
63 l_api_name CONSTANT VARCHAR2(30) := 'Lock_Row';
64 BEGIN
65 OPEN C;
66 FETCH C INTO Recinfo;
67 if (C%NOTFOUND) then
68 CLOSE C;
69 FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_DELETED');
70 APP_EXCEPTION.Raise_Exception;
71 end if;
72 CLOSE C;
73
74 IF
75 (Recinfo.distribution_id = X_Distribution_Id)
76 AND (Recinfo.requisition_line_id = X_Requisition_Line_Id)
77 AND (Recinfo.set_of_books_id = X_Set_Of_Books_Id)
78 AND (Recinfo.code_combination_id = X_Code_Combination_Id)
79
80 -- <SERVICES FPJ START>
81 AND ( ( Recinfo.req_line_quantity = X_Req_Line_Quantity )
82 OR ( ( Recinfo.req_line_quantity IS NULL )
83 AND ( X_Req_Line_Quantity IS NULL ) ) )
84 AND ( ( Recinfo.req_line_amount = X_Req_Line_Amount )
85 OR ( ( Recinfo.req_line_amount IS NULL )
86 AND ( X_Req_Line_Amount IS NULL ) ) )
87 -- <SERVICES FPJ END>
88
89 AND ( (TRIM(Recinfo.encumbered_flag) = TRIM(X_Encumbered_Flag))
90 OR ( (TRIM(Recinfo.encumbered_flag) IS NULL)
91 AND (TRIM(X_Encumbered_Flag) IS NULL)))
92 AND ( (trunc(Recinfo.gl_encumbered_date) = trunc(X_Gl_Encumbered_Date))
93 OR ( (Recinfo.gl_encumbered_date IS NULL)
94 AND (X_Gl_Encumbered_Date IS NULL)))
95 AND ( (TRIM(Recinfo.gl_encumbered_period_name) = TRIM(X_Gl_Encumbered_Period_Name))
96 OR ( (TRIM(Recinfo.gl_encumbered_period_name) IS NULL)
97 AND (TRIM(X_Gl_Encumbered_Period_Name) IS NULL)))
98 AND ( (trunc(Recinfo.gl_cancelled_date) = trunc(X_Gl_Cancelled_Date))
99 OR ( (Recinfo.gl_cancelled_date IS NULL)
100 AND (X_Gl_Cancelled_Date IS NULL)))
101 AND ( (TRIM(Recinfo.failed_funds_lookup_code) = TRIM(X_Failed_Funds_Lookup_Code))
102 OR ( (TRIM(Recinfo.failed_funds_lookup_code) IS NULL)
103 AND (TRIM(X_Failed_Funds_Lookup_Code) IS NULL)))
104 AND ( (Recinfo.encumbered_amount = X_Encumbered_Amount)
105 OR ( (Recinfo.encumbered_amount IS NULL)
106 AND (X_Encumbered_Amount IS NULL)))
107 AND ( (Recinfo.budget_account_id = X_Budget_Account_Id)
108 OR ( (Recinfo.budget_account_id IS NULL)
109 AND (X_Budget_Account_Id IS NULL)))
110 AND ( (Recinfo.accrual_account_id = X_Accrual_Account_Id)
111 OR ( (Recinfo.accrual_account_id IS NULL)
112 AND (X_Accrual_Account_Id IS NULL)))
113 AND ( (Recinfo.variance_account_id = X_Variance_Account_Id)
114 OR ( (Recinfo.variance_account_id IS NULL)
115 AND (X_Variance_Account_Id IS NULL)))
116 AND ( (TRIM(Recinfo.prevent_encumbrance_flag) = TRIM(X_Prevent_Encumbrance_Flag))
117 OR ( (TRIM(Recinfo.prevent_encumbrance_flag) IS NULL)
118 AND (TRIM(X_Prevent_Encumbrance_Flag) IS NULL))) THEN
119
120
121 IF
122 ( (TRIM(Recinfo.attribute_category) = TRIM(X_Attribute_Category))
123 OR ( (TRIM(Recinfo.attribute_category) IS NULL)
124 AND (TRIM(X_Attribute_Category) IS NULL)))
125 AND ( (TRIM(Recinfo.attribute1) = TRIM(X_Attribute1))
126 OR ( (TRIM(Recinfo.attribute1) IS NULL)
127 AND (TRIM(X_Attribute1) IS NULL)))
128 AND ( (TRIM(Recinfo.attribute2) = TRIM(X_Attribute2))
129 OR ( (TRIM(Recinfo.attribute2) IS NULL)
130 AND (TRIM(X_Attribute2) IS NULL)))
131 AND ( (TRIM(Recinfo.attribute3) = TRIM(X_Attribute3))
132 OR ( (TRIM(Recinfo.attribute3) IS NULL)
133 AND (TRIM(X_Attribute3)IS NULL)))
134 AND ( (TRIM(Recinfo.attribute4) = TRIM(X_Attribute4))
135 OR ( (TRIM(Recinfo.attribute4) IS NULL)
136 AND (TRIM(X_Attribute4) IS NULL)))
137 AND ( (TRIM(Recinfo.attribute5) = TRIM(X_Attribute5))
138 OR ( (TRIM(Recinfo.attribute5) IS NULL)
139 AND (TRIM(X_Attribute5) IS NULL)))
140 AND ( (TRIM(Recinfo.attribute6) = TRIM(X_Attribute6))
141 OR ( (TRIM(Recinfo.attribute6) IS NULL)
142 AND (TRIM(X_Attribute6) IS NULL)))
143 AND ( (TRIM(Recinfo.attribute7) = TRIM(X_Attribute7))
144 OR ( (TRIM(Recinfo.attribute7) IS NULL)
145 AND (TRIM(X_Attribute7) IS NULL)))
146 AND ( (TRIM(Recinfo.attribute8) = TRIM(X_Attribute8))
147 OR ( (TRIM(Recinfo.attribute8) IS NULL)
148 AND (TRIM(X_Attribute8) IS NULL)))
149 AND ( (TRIM(Recinfo.attribute9) = TRIM(X_Attribute9))
150 OR ( (TRIM(Recinfo.attribute9) IS NULL)
151 AND (TRIM(X_Attribute9) IS NULL)))
152 AND ( (TRIM(Recinfo.attribute10) = TRIM(X_Attribute10))
153 OR ( (TRIM(Recinfo.attribute10) IS NULL)
154 AND (TRIM(X_Attribute10) IS NULL)))
155 AND ( (TRIM(Recinfo.attribute11) = TRIM(X_Attribute11))
156 OR ( (TRIM(Recinfo.attribute11) IS NULL)
157 AND (TRIM(X_Attribute11) IS NULL)))
158 AND ( (TRIM(Recinfo.attribute12) = TRIM(X_Attribute12))
159 OR ( (TRIM(Recinfo.attribute12) IS NULL)
160 AND (TRIM(X_Attribute12) IS NULL)))
161 AND ( (TRIM(Recinfo.attribute13) = TRIM(X_Attribute13))
162 OR ( (TRIM(Recinfo.attribute13) IS NULL)
163 AND (TRIM(X_Attribute13) IS NULL)))
164 AND ( (TRIM(Recinfo.attribute14) = TRIM(X_Attribute14))
165 OR ( (TRIM(Recinfo.attribute14) IS NULL)
166 AND (TRIM(X_Attribute14) IS NULL)))
167 AND ( (TRIM(Recinfo.attribute15) = TRIM(X_Attribute15))
168 OR ( (TRIM(Recinfo.attribute15) IS NULL)
169 AND (TRIM(X_Attribute15) IS NULL)))
170 AND ( (TRIM(Recinfo.government_context) = TRIM(X_Government_Context))
171 OR ( (TRIM(Recinfo.government_context) IS NULL)
172 AND (TRIM(X_Government_Context) IS NULL)))
173 AND ( (Recinfo.project_id = X_Project_Id)
174 OR ( (Recinfo.project_id IS NULL)
175 AND (X_Project_Id IS NULL)))
176 AND ( (Recinfo.task_id = X_Task_Id)
177 OR ( (Recinfo.task_id IS NULL)
178 AND (X_Task_Id IS NULL)))
179 AND ( (TRIM(Recinfo.end_item_unit_number) = TRIM(X_End_Item_Unit_Number))
180 OR ( (TRIM(Recinfo.end_item_unit_number) IS NULL)
181 AND (TRIM(X_End_Item_Unit_Number) IS NULL)))
182 AND ( (Recinfo.Recovery_Rate = X_Recovery_Rate)
183 OR ( (Recinfo.Recovery_Rate IS NULL)
184 AND (X_Recovery_Rate IS NULL)))
185 AND ( (TRIM(Recinfo.tax_recovery_override_flag) = TRIM(X_Tax_Recovery_Override_Flag))
186 OR ( (TRIM(Recinfo.tax_recovery_override_flag) IS NULL)
187 AND (TRIM(X_Tax_Recovery_Override_Flag) IS NULL)))
188 AND ( (TRIM(Recinfo.expenditure_type) = TRIM(X_Expenditure_Type))
189 OR ( (TRIM(Recinfo.expenditure_type) IS NULL)
190 AND (TRIM(X_Expenditure_Type) IS NULL)))
191 AND ( (TRIM(Recinfo.project_accounting_context) = TRIM(X_Project_Accounting_Context))
192 OR ( (TRIM(Recinfo.project_accounting_context) IS NULL)
193 AND (TRIM(X_Project_Accounting_Context) IS NULL)))
194 AND ( (Recinfo.expenditure_organization_id = X_Expenditure_Organization_Id)
195 OR ( (Recinfo.expenditure_organization_id IS NULL)
196 AND (X_Expenditure_Organization_Id IS NULL)))
197 AND ( (trunc(Recinfo.gl_closed_date) = trunc(X_Gl_Closed_Date))
198 OR ( (Recinfo.gl_closed_date IS NULL)
199 AND (X_Gl_Closed_Date IS NULL)))
200 AND ( (Recinfo.source_req_distribution_id = X_Source_Req_Distribution_Id)
201 OR ( (Recinfo.source_req_distribution_id IS NULL)
202 AND (X_Source_Req_Distribution_Id IS NULL)))
203 AND (Recinfo.distribution_num = X_Distribution_Num)
204 AND ( (TRIM(Recinfo.project_related_flag) = TRIM(X_Project_Related_Flag))
205 OR ( (TRIM(Recinfo.project_related_flag) IS NULL)
206 AND (TRIM(X_Project_Related_Flag) IS NULL)))
207 AND ( (trunc(Recinfo.expenditure_item_date) = trunc(X_Expenditure_Item_Date))
208 OR ( (Recinfo.expenditure_item_date IS NULL)
209 AND (X_Expenditure_Item_Date IS NULL))) THEN
210
211 return;
212
213 END IF;
214
215 END IF;
216
217 /*
218 ** If we get to this point then a column has been changed.
219 */
220
221 IF (g_fnd_debug = 'Y') THEN
222 if (nvl(X_Distribution_Id,-999) <> nvl(Recinfo.Distribution_Id,-999) ) then
223 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Distribution_Id '||X_Distribution_Id ||' Database Distribution_Id '||Recinfo.Distribution_Id);
224 end if;
225 if (nvl(X_requisition_Line_Id,-999) <> nvl(Recinfo.requisition_Line_Id,-999)) then
226 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form requisition_Line_Id '||X_requisition_Line_Id||' Database requisition_Line_Id '||Recinfo.requisition_Line_Id);
227 end if;
228 if (nvl(X_Set_Of_Books_Id,-999) <> nvl( Recinfo.Set_Of_Books_Id,-999)) then
229 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Set_Of_Books_Id '||X_Set_Of_Books_Id ||' Database Set_Of_Books_Id '||Recinfo.Set_Of_Books_Id);
230 end if;
231 if (nvl(X_Code_Combination_Id,-999) <> nvl( Recinfo.Code_Combination_Id,-999)) then
232 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Code_Combination_Id '||X_Code_Combination_Id ||' Database Code_Combination_Id '||Recinfo.Code_Combination_Id);
233 end if;
234 if (nvl(X_Req_Line_Quantity ,-999) <> nvl( Recinfo.Req_Line_Quantity ,-999)) then
235 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Req_Line_Quantity '||X_Req_Line_Quantity ||' Database Req_Line_Quantity '||Recinfo.Req_Line_Quantity);
236 end if;
237 if (nvl(X_Req_Line_Amount ,-999) <> nvl( Recinfo.Req_Line_Amount ,-999)) then
238 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Req_Line_Amount '||X_Req_Line_Amount ||' Database Req_Line_Amount '||Recinfo.Req_Line_Amount);
239 end if;
240 if (nvl(X_Encumbered_Flag,'-999') <> nvl(Recinfo.Encumbered_Flag ,'-999')) then
241 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Encumbered_Flag '||X_Encumbered_Flag ||' Database Encumbered_Flag '||Recinfo.Encumbered_Flag);
242 end if;
243 if (trunc(X_Gl_Encumbered_Date) <> trunc(Recinfo.Gl_Encumbered_Date) ) then
244 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Gl_Encumbered_Date '||X_Gl_Encumbered_Date ||' Database Gl_Encumbered_Date '||Recinfo.Gl_Encumbered_Date);
245 end if;
249 if (trunc(X_Gl_Cancelled_Date) <> trunc(Recinfo.Gl_Cancelled_Date) ) then
246 if (nvl(X_Gl_Encumbered_Period_Name,'-999') <> nvl(Recinfo.Gl_Encumbered_Period_Name,'-999')) then
247 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Gl_Encumbered_Period_Name '||X_Gl_Encumbered_Period_Name ||' Database Gl_Encumbered_Period_Name '||Recinfo.Gl_Encumbered_Period_Name);
248 end if;
250 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Gl_Cancelled_Date '||X_Gl_Cancelled_Date ||' Database Gl_Cancelled_Date '||Recinfo.Gl_Cancelled_Date);
251 end if;
252 if (nvl(X_Failed_Funds_Lookup_Code,'-999') <> nvl(Recinfo.Failed_Funds_Lookup_Code,'-999')) then
253 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Failed_Funds_Lookup_Code '||X_Failed_Funds_Lookup_Code ||' Database Failed_Funds_Lookup_Code '||Recinfo.Failed_Funds_Lookup_Code);
254 end if;
255 if (nvl(X_Encumbered_Amount,-999) <> nvl(Recinfo.Encumbered_Amount,-999)) then
256 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Encumbered_Amount '||X_Encumbered_Amount ||' Database Encumbered_Amount '||Recinfo.Encumbered_Amount);
257 end if;
258 if (nvl(X_Budget_Account_Id,-999) <> nvl(Recinfo.Budget_Account_Id,-999)) then
259 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Budget_Account_Id '||X_Budget_Account_Id ||' Database Budget_Account_Id '||Recinfo.Budget_Account_Id);
260 end if;
261 if (nvl(X_Accrual_Account_Id,-999) <> nvl(Recinfo.Accrual_Account_Id,-999) ) then
262 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Accrual_Account_Id '||X_Accrual_Account_Id ||' Database Accrual_Account_Id '||Recinfo.Accrual_Account_Id);
263 end if;
264 if (nvl(X_Variance_Account_Id ,-999) <> nvl(Recinfo.Variance_Account_Id,-999) ) then
265 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Variance_Account_Id '||X_Variance_Account_Id ||' Database Variance_Account_Id '||Recinfo.Variance_Account_Id);
266 end if;
267 if (nvl(X_Prevent_Encumbrance_Flag,'-999') <> nvl(Recinfo.Prevent_Encumbrance_Flag,'-999')) then
268 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Prevent_Encumbrance_Flag '||X_Prevent_Encumbrance_Flag||' Database Prevent_Encumbrance_Flag '||Recinfo.Prevent_Encumbrance_Flag);
269 end if;
270 if (nvl(X_Attribute_Category,'-999') <> nvl( Recinfo.Attribute_Category,'-999')) then
271 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Attribute_Category '||X_Attribute_Category ||' Database Attribute_Category '||Recinfo.Attribute_Category);
272 end if;
273 if (nvl(X_Attribute1,'-999') <> nvl( Recinfo.Attribute1,'-999')) then
274 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Attribute1 '||X_Attribute1 ||' Database Attribute1 '||Recinfo.Attribute1);
275 end if;
276 if (nvl(X_Attribute2,'-999') <> nvl( Recinfo.Attribute2,'-999')) then
277 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Attribute2 '||X_Attribute2 ||' Database Attribute2 '||Recinfo.Attribute2);
278 end if;
279 if (nvl(X_Attribute3,'-999') <> nvl( Recinfo.Attribute3,'-999')) then
280 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Attribute3 '||X_Attribute3 ||' Database Attribute3 '||Recinfo.Attribute3);
281 end if;
282 if (nvl(X_Attribute4,'-999') <> nvl( Recinfo.Attribute4,'-999')) then
283 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Attribute4 '||X_Attribute4 ||' Database Attribute4 '||Recinfo.Attribute4);
284 end if;
285 if (nvl(X_Attribute5,'-999') <> nvl( Recinfo.Attribute5,'-999')) then
286 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Attribute5 '||X_Attribute5 ||' Database Attribute5 '||Recinfo.Attribute5);
287 end if;
288 if (nvl(X_Attribute6,'-999') <> nvl( Recinfo.Attribute6,'-999')) then
289 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Attribute6 '||X_Attribute6 ||' Database Attribute6 '||Recinfo.Attribute6);
290 end if;
291 if (nvl(X_Attribute7,'-999') <> nvl( Recinfo.Attribute7,'-999')) then
292 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Attribute7 '||X_Attribute7 ||' Database Attribute7 '||Recinfo.Attribute7);
293 end if;
294 if (nvl(X_Attribute8,'-999') <> nvl( Recinfo.Attribute8,'-999')) then
295 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Attribute8 '||X_Attribute8 ||' Database Attribute8 '||Recinfo.Attribute8);
296 end if;
297 if (nvl(X_Attribute9,'-999') <> nvl( Recinfo.Attribute9,'-999')) then
298 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Attribute9 '||X_Attribute9 ||' Database Attribute9 '||Recinfo.Attribute9);
299 end if;
300 if (nvl(X_Attribute10,'-999') <> nvl( Recinfo.Attribute10,'-999')) then
301 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Attribute10 '||X_Attribute10 ||' Database Attribute10 '||Recinfo.Attribute10);
302 end if;
303 if (nvl(X_Attribute11,'-999') <> nvl( Recinfo.Attribute11,'-999')) then
304 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Attribute11 '||X_Attribute11 ||' Database Attribute11 '||Recinfo.Attribute11);
305 end if;
306 if (nvl(X_Attribute12,'-999') <> nvl( Recinfo.Attribute12,'-999')) then
307 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Attribute12 '||X_Attribute12 ||' Database Attribute12 '||Recinfo.Attribute12);
308 end if;
309 if (nvl(X_Attribute13,'-999') <> nvl( Recinfo.Attribute13,'-999')) then
310 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Attribute13 '||X_Attribute13 ||' Database Attribute13 '||Recinfo.Attribute13);
311 end if;
312 if (nvl(X_Attribute14,'-999') <> nvl( Recinfo.Attribute14,'-999')) then
313 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Attribute14 '||X_Attribute14 ||' Database Attribute14 '||Recinfo.Attribute14);
314 end if;
315 if (nvl(X_Attribute15,'-999') <> nvl( Recinfo.Attribute15,'-999')) then
316 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Attribute15 '||X_Attribute15 ||' Database Attribute15 '||Recinfo.Attribute15);
317 end if;
318 if (nvl(X_Government_Context,'-999') <> nvl( Recinfo.Government_Context,'-999')) then
319 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Government_Context '||X_Government_Context ||' Database Government_Context '||Recinfo.Government_Context);
320 end if;
321 if (nvl(X_Project_Id ,-999) <> nvl( Recinfo.Project_Id ,-999)) then
322 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Project_Id '||X_Project_Id ||' Database Project_Id '||Recinfo.Project_Id);
323 end if;
324 if (nvl(X_Task_Id,-999) <> nvl( Recinfo.Task_Id,-999)) then
325 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Task_Id '||X_Task_Id ||' Database Task_Id '||Recinfo.Task_Id);
326 end if;
327 if (nvl(X_Expenditure_Type,'-999') <> nvl( Recinfo.Expenditure_Type,'-999')) then
328 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Expenditure_Type '||X_Expenditure_Type ||' Database Expenditure_Type '||Recinfo.Expenditure_Type);
329 end if;
330 if (nvl(X_Project_Accounting_Context,'-999') <> nvl( Recinfo.Project_Accounting_Context,'-999')) then
331 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Project_Accounting_Context '||X_Project_Accounting_Context ||' Database Project_Accounting_Context '||Recinfo.Project_Accounting_Context);
332 end if;
333 if (nvl(X_Expenditure_Organization_Id,-999) <> nvl( Recinfo.Expenditure_Organization_Id ,-999)) then
334 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Expenditure_Organization_Id '||X_Expenditure_Organization_Id ||' Database Expenditure_Organization_Id '||Recinfo.Expenditure_Organization_Id);
335 end if;
336 if (trunc(X_Gl_Closed_Date) <> trunc(Recinfo.Gl_Closed_Date) ) then
337 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Gl_Closed_Date '||X_Gl_Closed_Date ||' Database Gl_Closed_Date '||Recinfo.Gl_Closed_Date);
338 end if;
339 if (nvl(X_Source_Req_Distribution_Id,-999) <> nvl(Recinfo.Source_Req_Distribution_Id,-999) ) then
340 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Source_Req_Distribution_Id '||X_Source_Req_Distribution_Id ||' Database Source_Req_Distribution_Id '||Recinfo.Source_Req_Distribution_Id);
341 end if;
342 if (nvl(X_Distribution_Num,-999) <> nvl( Recinfo.Distribution_Num,-999)) then
343 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Distribution_Num '||X_Distribution_Num ||' Database Distribution_Num '||Recinfo.Distribution_Num);
344 end if;
345 if (nvl(X_Project_Related_flag,'-999') <> nvl(Recinfo.Project_Related_flag ,'-999')) then
346 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Project_Related_flag '||X_Project_Related_flag ||' Database Project_Related_flag '||Recinfo.Project_Related_flag);
347 end if;
348 if ( trunc(X_Expenditure_Item_Date) <> trunc(Recinfo.Expenditure_Item_Date) ) then
349 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Expenditure_Item_Date '||X_Expenditure_Item_Date ||' Database Expenditure_Item_Date '||Recinfo.Expenditure_Item_Date);
350 end if;
351 if (nvl(X_End_Item_Unit_Number,-999) <> nvl(Recinfo.End_Item_Unit_Number,-999)) then
352 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form End_Item_Unit_Number '||X_End_Item_Unit_Number ||' Database End_Item_Unit_Number '||Recinfo.End_Item_Unit_Number);
353 end if;
354 if (nvl(X_Recovery_Rate,-999) <> nvl(Recinfo.Recovery_Rate,-999)) then
355 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Recovery_Rate '||X_Recovery_Rate ||' Database Recovery_Rate '||Recinfo.Recovery_Rate);
356 end if;
357 if (nvl(X_Tax_Recovery_Override_Flag,'-999') <> nvl(Recinfo.Tax_Recovery_Override_Flag ,'-999')) then
358 FND_LOG.string(FND_LOG.LEVEL_STATEMENT,c_log_head || l_api_name,' Form Tax_Recovery_Override_Flag '||X_Tax_Recovery_Override_Flag ||' Database Tax_Recovery_Override_Flag '||Recinfo.Tax_Recovery_Override_Flag);
359 end if;
360 END IF;
361
362 FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_CHANGED');
363 APP_EXCEPTION.RAISE_EXCEPTION;
364
365 END Lock_Row;
366
367
368
369 PROCEDURE Delete_Row(X_Rowid VARCHAR2) IS
370 BEGIN
371 DELETE FROM PO_REQ_DISTRIBUTIONS
372 WHERE rowid = X_Rowid;
373
374 if (SQL%NOTFOUND) then
375 Raise NO_DATA_FOUND;
376 end if;
377
378
379 END Delete_Row;
380
381 END PO_REQ_DISTRIBUTIONS_PKG2;