DBA Data[Home] [Help]

APPS.PO_WF_PO_RULE_ACC dependencies on PO_WF_PO_RULE_ACC

Line 1: PACKAGE BODY PO_WF_PO_RULE_ACC AS

1: PACKAGE BODY PO_WF_PO_RULE_ACC AS
2: /* $Header: POXRUACB.pls 120.1 2005/06/03 01:15:44 appldev $*/
3:
4: -- Read the profile option that enables/disables the debug log
5: g_po_wf_debug VARCHAR2(1) := NVL(FND_PROFILE.VALUE('PO_SET_DEBUG_WORKFLOW_ON'),'N');

Line 34: x_progress := 'PO_WF_PO_RULE_ACC.get_default_requester_acc: 01';

30: --< Shared Proc FPJ End >
31:
32: BEGIN
33:
34: x_progress := 'PO_WF_PO_RULE_ACC.get_default_requester_acc: 01';
35: IF (g_po_wf_debug = 'Y') THEN
36: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
37: END IF;
38:

Line 48: x_progress := 'PO_WF_PO_RULE_ACC.get_default_requester_acc: 02';

44: return;
45:
46: end if;
47:
48: x_progress := 'PO_WF_PO_RULE_ACC.get_default_requester_acc: 02';
49: x_requester_id := PO_WF_UTIL_PKG.GetItemAttrNumber(itemtype => itemtype,
50: itemkey => itemkey,
51: aname => 'TO_PERSON_ID');
52:

Line 121: x_progress := 'PO_WF_PO_RULE_ACC.get_default_requester_acc: 03';

117: AND NVL(fsp.org_id, -99) = NVL(l_expense_rules_org_id, -99);
118: --< Shared Proc FPJ End >
119:
120:
121: x_progress := 'PO_WF_PO_RULE_ACC.get_default_requester_acc: 03';
122: if x_ccid is not null then
123: PO_WF_UTIL_PKG.SetItemAttrNumber (itemtype => itemtype,
124: itemkey => itemkey,
125: aname => 'DEFAULT_ACCT_ID',

Line 139: wf_core.context('PO_WF_PO_RULE_ACC','get_default_requester_acc',x_progress);

135: RETURN;
136:
137: EXCEPTION
138: WHEN OTHERS THEN
139: wf_core.context('PO_WF_PO_RULE_ACC','get_default_requester_acc',x_progress);
140: result := 'COMPLETE:FAILURE';
141: RETURN;
142:
143: END get_default_requester_acc;

Line 159: x_progress := 'PO_WF_PO_RULE_ACC.get_favorite_charge_acc: 01';

155: x_ccid NUMBER;
156:
157: BEGIN
158:
159: x_progress := 'PO_WF_PO_RULE_ACC.get_favorite_charge_acc: 01';
160:
161: IF (g_po_wf_debug = 'Y') THEN
162: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
163: END IF;

Line 172: x_progress := 'PO_WF_PO_RULE_ACC.get_favorite_charge_acc: Favorite charge account functionality not provided';

168: end if;
169:
170: -- Verify if the user has access to Favorite charge account function
171: IF NOT FND_FUNCTION.TEST('POR_FAV_CHG_ACCT') THEN
172: x_progress := 'PO_WF_PO_RULE_ACC.get_favorite_charge_acc: Favorite charge account functionality not provided';
173: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
174: result := 'COMPLETE:FAILURE'; -- Bug 3626954 Return failure instead of success
175: RETURN;
176: END IF;

Line 178: x_progress := 'PO_WF_PO_RULE_ACC.get_favorite_charge_acc: 02';

174: result := 'COMPLETE:FAILURE'; -- Bug 3626954 Return failure instead of success
175: RETURN;
176: END IF;
177:
178: x_progress := 'PO_WF_PO_RULE_ACC.get_favorite_charge_acc: 02';
179:
180: x_user_id := FND_GLOBAL.EMPLOYEE_ID;
181:
182: x_resp_id := FND_GLOBAL.RESP_ID;

Line 184: x_progress := 'PO_WF_PO_RULE_ACC. get_favorite_charge_acc: 03';

180: x_user_id := FND_GLOBAL.EMPLOYEE_ID;
181:
182: x_resp_id := FND_GLOBAL.RESP_ID;
183:
184: x_progress := 'PO_WF_PO_RULE_ACC. get_favorite_charge_acc: 03';
185:
186: Select CHARGE_ACCOUNT_ID
187: into x_ccid
188: from POR_FAV_CHARGE_ACCOUNTS

Line 193: x_progress := 'PO_WF_PO_RULE_ACC.get_favorite_charge_acc: 04';

189: where EMPLOYEE_ID = x_user_id and
190: RESPONSIBILITY_ID = x_resp_id and
191: DEFAULT_ACCOUNT = 'Y';
192:
193: x_progress := 'PO_WF_PO_RULE_ACC.get_favorite_charge_acc: 04';
194:
195:
196: if x_ccid is not null then
197: PO_WF_UTIL_PKG.SetItemAttrNumber (itemtype => itemtype,

Line 210: wf_core.context('PO_WF_PO_RULE_ACC','get_favorite_charge_acc',x_progress);

206: RETURN;
207:
208: EXCEPTION
209: WHEN OTHERS THEN
210: wf_core.context('PO_WF_PO_RULE_ACC','get_favorite_charge_acc',x_progress);
211: result := 'COMPLETE:FAILURE';
212: RETURN;
213:
214: END get_favorite_charge_acc;

Line 228: l_progress := 'PO_WF_PO_RULE_ACC.if_enforce_expense_acc_rules: 01';

224: l_progress varchar2(100);
225: l_options_value VARCHAR2(30);
226:
227: BEGIN
228: l_progress := 'PO_WF_PO_RULE_ACC.if_enforce_expense_acc_rules: 01';
229:
230: fnd_profile.get('POR_REQ_ENFORCE_EXP_ACC_RULE', l_options_value);
231:
232: l_progress := 'PO_WF_PO_RULE_ACC.if_enforce_expense_acc_rules: 02';

Line 232: l_progress := 'PO_WF_PO_RULE_ACC.if_enforce_expense_acc_rules: 02';

228: l_progress := 'PO_WF_PO_RULE_ACC.if_enforce_expense_acc_rules: 01';
229:
230: fnd_profile.get('POR_REQ_ENFORCE_EXP_ACC_RULE', l_options_value);
231:
232: l_progress := 'PO_WF_PO_RULE_ACC.if_enforce_expense_acc_rules: 02';
233:
234: if l_options_value is not null then
235: result:='COMPLETE:'|| l_options_value;
236: return;

Line 245: WF_CORE.context('PO_WF_PO_RULE_ACC','if_enforce_expense_acc_rules', l_progress);

241:
242:
243: EXCEPTION
244: WHEN OTHERS THEN
245: WF_CORE.context('PO_WF_PO_RULE_ACC','if_enforce_expense_acc_rules', l_progress);
246: result:='COMPLETE:'||'N';
247:
248: END if_enforce_expense_acc_rules;
249:

Line 274: l_progress := 'PO_WF_PO_RULE_ACC.IF_RULE_EXIST_FOR_ALL_SEGMENTS: 01';

270: --< Shared Proc FPJ End >
271:
272: BEGIN
273:
274: l_progress := 'PO_WF_PO_RULE_ACC.IF_RULE_EXIST_FOR_ALL_SEGMENTS: 01';
275:
276: IF (g_po_wf_debug = 'Y') THEN
277: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,l_progress);
278: END IF;

Line 285: l_progress := 'PO_WF_PO_RULE_ACC.IF_RULE_EXIST_FOR_ALL_SEGMENTS: 02';

281: result := wf_engine.eng_null;
282: return;
283: end if;
284:
285: l_progress := 'PO_WF_PO_RULE_ACC.IF_RULE_EXIST_FOR_ALL_SEGMENTS: 02';
286:
287: --< Shared Proc FPJ Start >
288:
289: -- The Expense Account Rules are called from the PO AG Workflow

Line 315: 'PO_WF_PO_RULE_ACC.if_rule_exist_for_all_segments '||

311: END IF;
312:
313: IF (g_po_wf_debug = 'Y') THEN
314: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,
315: 'PO_WF_PO_RULE_ACC.if_rule_exist_for_all_segments '||
316: 'l_expense_rules_org_id='||l_expense_rules_org_id);
317: END IF;
318:
319: --< Shared Proc FPJ End >

Line 326: 'PO_WF_PO_RULE_ACC.if_rule_exist_for_all_segments '||

322: get_segment_records(itemtype, itemkey, l_get_result);
323:
324: IF (g_po_wf_debug = 'Y') THEN
325: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,
326: 'PO_WF_PO_RULE_ACC.if_rule_exist_for_all_segments '||
327: 'get_segment_records->result='||l_get_result);
328: END IF;
329:
330:

Line 331: l_progress := 'PO_WF_PO_RULE_ACC.IF_RULE_EXIST_FOR_ALL_SEGMENTS: 03';

327: 'get_segment_records->result='||l_get_result);
328: END IF;
329:
330:
331: l_progress := 'PO_WF_PO_RULE_ACC.IF_RULE_EXIST_FOR_ALL_SEGMENTS: 03';
332:
333: if (l_get_result = 'fail') then
334: result := 'COMPLETE:'||'N';
335: l_counter := -1;

Line 339: l_progress := 'PO_WF_PO_RULE_ACC.IF_RULE_EXIST_FOR_ALL_SEGMENTS: 04';

335: l_counter := -1;
336: return;
337: end if;
338:
339: l_progress := 'PO_WF_PO_RULE_ACC.IF_RULE_EXIST_FOR_ALL_SEGMENTS: 04';
340:
341: -- set l_segments_number_sob , the total number of account segments for
342: -- the current set of books, by any query or api from GL, sent email to
343: -- ask Gursat.Olgun for the query or api.

Line 367: l_progress := 'PO_WF_PO_RULE_ACC.IF_RULE_EXIST_FOR_ALL_SEGMENTS: 05';

363: --< Shared Proc FPJ End >
364:
365: if ( l_segment_table.count = l_segments_number_sob) THEN
366:
367: l_progress := 'PO_WF_PO_RULE_ACC.IF_RULE_EXIST_FOR_ALL_SEGMENTS: 05';
368:
369: -- get concatenated account segments
370: FOR i IN 0..l_segment_table.count-1 LOOP
371: wf_engine.SetItemAttrText(itemtype, itemkey,

Line 377: l_progress := 'PO_WF_PO_RULE_ACC.IF_RULE_EXIST_FOR_ALL_SEGMENTS: 06';

373: l_segment_table(i).segment_value);
374: l_segment_array(i+1) := l_segment_table(i).segment_value;
375: END LOOP;
376:
377: l_progress := 'PO_WF_PO_RULE_ACC.IF_RULE_EXIST_FOR_ALL_SEGMENTS: 06';
378:
379: -- get chart_of_accounts_id
380:
381: select gls.chart_of_accounts_id

Line 398: l_progress := 'PO_WF_PO_RULE_ACC.IF_RULE_EXIST_FOR_ALL_SEGMENTS: 07';

394: NVL(fsp.org_id, -99) = NVL(l_expense_rules_org_id, -99);
395: --< Shared Proc FPJ End >
396:
397:
398: l_progress := 'PO_WF_PO_RULE_ACC.IF_RULE_EXIST_FOR_ALL_SEGMENTS: 07';
399:
400: --
401: -- Use the FND_FLEX_EXT pacakge to concatenate the segments
402: --

Line 405: l_progress := 'PO_WF_PO_RULE_ACC.IF_RULE_EXIST_FOR_ALL_SEGMENTS: 08';

401: -- Use the FND_FLEX_EXT pacakge to concatenate the segments
402: --
403: l_delimiter := fnd_flex_ext.get_delimiter('SQLGL', 'GL#', l_chart_of_accounts_id);
404:
405: l_progress := 'PO_WF_PO_RULE_ACC.IF_RULE_EXIST_FOR_ALL_SEGMENTS: 08';
406:
407: IF (l_delimiter is not null) THEN
408:
409: l_concat_segs := fnd_flex_ext.concatenate_segments(l_segment_table.count,l_segment_array, l_delimiter);

Line 411: l_progress := 'PO_WF_PO_RULE_ACC.IF_RULE_EXIST_FOR_ALL_SEGMENTS: 09';

407: IF (l_delimiter is not null) THEN
408:
409: l_concat_segs := fnd_flex_ext.concatenate_segments(l_segment_table.count,l_segment_array, l_delimiter);
410:
411: l_progress := 'PO_WF_PO_RULE_ACC.IF_RULE_EXIST_FOR_ALL_SEGMENTS: 09';
412:
413: l_ccId := fnd_flex_ext.get_ccid('SQLGL','GL#',l_chart_of_accounts_id, to_char(sysdate, 'YYYY/MM/DD HH24:MI:SS'),l_concat_segs);
414:
415: l_progress := 'PO_WF_PO_RULE_ACC.IF_RULE_EXIST_FOR_ALL_SEGMENTS: 10';

Line 415: l_progress := 'PO_WF_PO_RULE_ACC.IF_RULE_EXIST_FOR_ALL_SEGMENTS: 10';

411: l_progress := 'PO_WF_PO_RULE_ACC.IF_RULE_EXIST_FOR_ALL_SEGMENTS: 09';
412:
413: l_ccId := fnd_flex_ext.get_ccid('SQLGL','GL#',l_chart_of_accounts_id, to_char(sysdate, 'YYYY/MM/DD HH24:MI:SS'),l_concat_segs);
414:
415: l_progress := 'PO_WF_PO_RULE_ACC.IF_RULE_EXIST_FOR_ALL_SEGMENTS: 10';
416:
417: if l_ccId is not null then
418: PO_WF_UTIL_PKG.SetItemAttrNumber (
419: itemtype => itemtype,

Line 431: l_progress := 'PO_WF_PO_RULE_ACC.IF_RULE_EXIST_FOR_ALL_SEGMENTS: 11';

427: result := 'COMPLETE:'||'N';
428: end if;
429:
430: ELSE
431: l_progress := 'PO_WF_PO_RULE_ACC.IF_RULE_EXIST_FOR_ALL_SEGMENTS: 11';
432:
433: result := 'COMPLETE:'||'N';
434: END IF;
435:

Line 437: l_progress := 'PO_WF_PO_RULE_ACC.IF_RULE_EXIST_FOR_ALL_SEGMENTS: 12';

433: result := 'COMPLETE:'||'N';
434: END IF;
435:
436: else
437: l_progress := 'PO_WF_PO_RULE_ACC.IF_RULE_EXIST_FOR_ALL_SEGMENTS: 12';
438:
439: result := 'COMPLETE:'||'N';
440:
441: end if;

Line 445: 'PO_WF_PO_RULE_ACC.if_rule_exist_for_all_segments '||

441: end if;
442:
443: IF (g_po_wf_debug = 'Y') THEN
444: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,
445: 'PO_WF_PO_RULE_ACC.if_rule_exist_for_all_segments '||
446: 'result='||result);
447: END IF;
448:
449: l_segment_table.DELETE;

Line 458: 'PO_WF_PO_RULE_ACC.if_rule_exist_for_all_segments '||

454: WHEN OTHERS THEN
455:
456: IF (g_po_wf_debug = 'Y') THEN
457: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,
458: 'PO_WF_PO_RULE_ACC.if_rule_exist_for_all_segments '||
459: 'EXCEPTION at '|| l_progress);
460: END IF;
461:
462: wf_core.context('PO_WF_PO_RULE_ACC','IF_RULE_EXIST_FOR_ALL_SEGMENTS',

Line 462: wf_core.context('PO_WF_PO_RULE_ACC','IF_RULE_EXIST_FOR_ALL_SEGMENTS',

458: 'PO_WF_PO_RULE_ACC.if_rule_exist_for_all_segments '||
459: 'EXCEPTION at '|| l_progress);
460: END IF;
461:
462: wf_core.context('PO_WF_PO_RULE_ACC','IF_RULE_EXIST_FOR_ALL_SEGMENTS',
463: l_progress);
464: result := 'COMPLETE:'||'N';
465: RETURN;
466: END IF_RULE_EXIST_FOR_ALL_SEGMENTS;

Line 481: x_progress := 'PO_WF_PO_RULE_ACC.get_category_account_segment: 01';

477: l_get_result varchar2(25) := NULL;
478:
479: BEGIN
480:
481: x_progress := 'PO_WF_PO_RULE_ACC.get_category_account_segment: 01';
482: IF (g_po_wf_debug = 'Y') THEN
483: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
484: END IF;
485:

Line 528: wf_core.context('PO_WF_PO_RULE_ACC','get_category_account_segment',x_progress);

524: RETURN;
525:
526: EXCEPTION
527: WHEN OTHERS THEN
528: wf_core.context('PO_WF_PO_RULE_ACC','get_category_account_segment',x_progress);
529: result := 'COMPLETE:FAILURE';
530: RETURN;
531:
532: END get_category_account_segment;

Line 553: x_progress := 'PO_WF_PO_RULE_ACC.get_segment_records: 01';

549: l_expense_rules_org_id NUMBER;
550: --< Shared Proc FPJ End >
551:
552: BEGIN
553: x_progress := 'PO_WF_PO_RULE_ACC.get_segment_records: 01';
554: x_category_id := PO_WF_UTIL_PKG.GetItemAttrText ( itemtype => itemtype,
555: itemkey => itemkey,
556: aname => 'CATEGORY_ID');
557:

Line 572: 'PO_WF_PO_RULE_ACC.get_segment_records '||

568: END IF;
569:
570: IF (g_po_wf_debug = 'Y') THEN
571: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,
572: 'PO_WF_PO_RULE_ACC.get_segment_records '||
573: 'l_expense_rules_org_id='||l_expense_rules_org_id);
574: END IF;
575:
576: --< Shared Proc FPJ End >

Line 659: wf_core.context('PO_WF_PO_RULE_ACC','get_segment_records',x_progress);

655: end if;
656:
657: EXCEPTION
658: WHEN OTHERS THEN
659: wf_core.context('PO_WF_PO_RULE_ACC','get_segment_records',x_progress);
660: resultout := 'fail';
661: RETURN;
662:
663: END get_segment_records;

Line 712: WF_CORE.context('PO_WF_PO_RULE_ACC', 'set_expense_rules_org_as_POU',

708: aname => 'EXPENSE_RULES_ORG_ID',
709: avalue => l_purchasing_ou_id);
710: EXCEPTION
711: WHEN OTHERS THEN
712: WF_CORE.context('PO_WF_PO_RULE_ACC', 'set_expense_rules_org_as_POU',
713: x_progress);
714: RAISE;
715: END set_expense_rules_org_as_POU;
716:

Line 762: WF_CORE.context('PO_WF_PO_RULE_ACC', 'set_expense_rules_org_as_DOU',

758: aname => 'EXPENSE_RULES_ORG_ID',
759: avalue => l_destination_ou_id);
760: EXCEPTION
761: WHEN OTHERS THEN
762: WF_CORE.context('PO_WF_PO_RULE_ACC', 'set_expense_rules_org_as_DOU',
763: x_progress);
764: RAISE;
765: END set_expense_rules_org_as_DOU;
766:

Line 769: END PO_WF_PO_RULE_ACC;

765: END set_expense_rules_org_as_DOU;
766:
767: --< Shared Proc FPJ End >
768:
769: END PO_WF_PO_RULE_ACC;