DBA Data[Home] [Help]

APPS.POR_AME_REQ_WF_PVT dependencies on AME_UTIL

Line 7: g_next_approvers ame_util.approversTable2;

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');
6:
7: g_next_approvers ame_util.approversTable2;
8:
9: FUNCTION position_has_valid_approvers( documentId NUMBER, documentType VARCHAR2 )RETURN VARCHAR2;
10:
11: Function is_last_approver_record( documentId NUMBER, documentType VARCHAR2, approverRecord in ame_util.approverRecord2 ) RETURN VARCHAR2;

Line 11: Function is_last_approver_record( documentId NUMBER, documentType VARCHAR2, approverRecord in ame_util.approverRecord2 ) RETURN VARCHAR2;

7: g_next_approvers ame_util.approversTable2;
8:
9: FUNCTION position_has_valid_approvers( documentId NUMBER, documentType VARCHAR2 )RETURN VARCHAR2;
10:
11: Function is_last_approver_record( documentId NUMBER, documentType VARCHAR2, approverRecord in ame_util.approverRecord2 ) RETURN VARCHAR2;
12:
13: PROCEDURE UpdateActionHistory(p_document_id NUMBER,
14: p_action VARCHAR2,
15: p_note VARCHAR2,

Line 53: l_orig_system wf_users.orig_system%TYPE := ame_util.perOrigSystem;

49: l_document_subtype PO_DOCUMENT_TYPES.DOCUMENT_SUBTYPE%TYPE;
50: l_next_approver_id NUMBER;
51: l_next_approver_user_name fnd_user.user_name%TYPE;
52: l_next_approver_disp_name wf_users.display_name%TYPE;
53: l_orig_system wf_users.orig_system%TYPE := ame_util.perOrigSystem;
54: l_sequence_num NUMBER;
55: l_approver_type VARCHAR2(30);
56:
57: l_doc_string varchar2(200);

Line 61: l_next_approver ame_util.approverRecord;

57: l_doc_string varchar2(200);
58: l_preparer_user_name fnd_user.user_name%TYPE;
59: l_org_id number;
60:
61: l_next_approver ame_util.approverRecord;
62: l_insertion_type VARCHAR2(30);
63: l_authority_type VARCHAR2(30);
64: l_transaction_type PO_DOCUMENT_TYPES.AME_TRANSACTION_TYPE%TYPE;
65:

Line 70: l_ame_exception ame_util.longestStringType;

66: l_completeYNO varchar2(100);
67: l_position_has_valid_approvers varchar2(10);
68: l_need_to_get_next_approver boolean;
69:
70: l_ame_exception ame_util.longestStringType;
71:
72: BEGIN
73: IF (funcmode = 'RUN') THEN
74:

Line 118: ame_util2.detailedApprovalStatusFlagYN := ame_util.booleanTrue;

114:
115: l_need_to_get_next_approver := FALSE;
116: BEGIN
117:
118: ame_util2.detailedApprovalStatusFlagYN := ame_util.booleanTrue;
119: ame_api2.getNextApprovers4( applicationIdIn=>applicationId,
120: transactionIdIn=>l_document_id,
121: transactionTypeIn=>l_transaction_type,
122: approvalProcessCompleteYNOut=>l_completeYNO,

Line 425: if (g_next_approvers(l_approver_index).orig_system = ame_util.perOrigSystem) then

421: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey, l_progress);
422: END IF;
423:
424: -- Check whether Position Hierarchy or Employee-Sup Hierarchy setup or FND users.
425: if (g_next_approvers(l_approver_index).orig_system = ame_util.perOrigSystem) then
426: l_next_approver_id := g_next_approvers(l_approver_index).orig_system_id;
427: elsif (g_next_approvers(l_approver_index).orig_system = ame_util.posOrigSystem) then
428:
429: begin

Line 427: elsif (g_next_approvers(l_approver_index).orig_system = ame_util.posOrigSystem) then

423:
424: -- Check whether Position Hierarchy or Employee-Sup Hierarchy setup or FND users.
425: if (g_next_approvers(l_approver_index).orig_system = ame_util.perOrigSystem) then
426: l_next_approver_id := g_next_approvers(l_approver_index).orig_system_id;
427: elsif (g_next_approvers(l_approver_index).orig_system = ame_util.posOrigSystem) then
428:
429: begin
430:
431: select first_position_id, first_approver_id

Line 470: elsif (g_next_approvers(l_approver_index).orig_system = ame_util.fndUserOrigSystem) then

466: WHEN NO_DATA_FOUND THEN
467: RAISE;
468: END;
469:
470: elsif (g_next_approvers(l_approver_index).orig_system = ame_util.fndUserOrigSystem) then
471: SELECT employee_id
472: into l_next_approver_id
473: FROM fnd_user
474: WHERE user_id = g_next_approvers(l_approver_index).orig_system_id

Line 482: WF_DIRECTORY.GetUserName(ame_util.perOrigSystem, l_next_approver_id, l_next_approver_user_name, l_next_approver_disp_name);

478: t_varname(22) := 'AME_APPROVER_TYPE';
479: t_varval(22) := g_next_approvers(l_approver_index).orig_system;
480:
481:
482: WF_DIRECTORY.GetUserName(ame_util.perOrigSystem, l_next_approver_id, l_next_approver_user_name, l_next_approver_disp_name);
483:
484: l_progress := 'Launch_Parallel_Approval: 004 -- Next Approver User Name -- display Name:' || l_next_approver_user_name || ' -- ' || l_next_approver_disp_name;
485: IF (g_po_wf_debug = 'Y') THEN
486: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey, l_progress);

Line 489: IF (g_next_approvers(l_approver_index).orig_system = ame_util.perOrigSystem) then

485: IF (g_po_wf_debug = 'Y') THEN
486: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey, l_progress);
487: END IF;
488: --bug6843383 start
489: IF (g_next_approvers(l_approver_index).orig_system = ame_util.perOrigSystem) then
490: t_varname(23) := 'APPROVER_USER_NAME';
491: t_varval(23) := g_next_approvers(l_approver_index).name;
492:
493: t_varname(24) := 'APPROVER_DISPLAY_NAME';

Line 511: if (g_next_approvers(l_approver_index).approver_category = ame_util.fyiApproverCategory) then

507: po_wf_debug_pkg.insert_debug(itemtype,itemkey,l_progress);
508: END IF;
509:
510: t_varname(25) := 'AME_IS_FYI_APPROVER';
511: if (g_next_approvers(l_approver_index).approver_category = ame_util.fyiApproverCategory) then
512: t_varval(25) :='Y';
513: l_has_fyi_app := 'Y';
514: l_start_block_activity := 'N';
515: else

Line 659: l_current_approver ame_util.approverRecord2;

655:
656: l_progress VARCHAR2(500) := '000';
657: l_document_id number;
658: l_transaction_type PO_DOCUMENT_TYPES.AME_TRANSACTION_TYPE%TYPE;
659: l_current_approver ame_util.approverRecord2;
660: l_approver_posoition_id number;
661: l_approver_type varchar2(10);
662: l_error_code NUMBER;
663: l_error_message ame_util.longestStringType;

Line 663: l_error_message ame_util.longestStringType;

659: l_current_approver ame_util.approverRecord2;
660: l_approver_posoition_id number;
661: l_approver_type varchar2(10);
662: l_error_code NUMBER;
663: l_error_message ame_util.longestStringType;
664: l_parent_item_type wf_items.parent_item_type%TYPE;
665: l_parent_item_key wf_items.parent_item_key%TYPE;
666: begin
667:

Line 690: if (l_approver_type = ame_util.posOrigSystem) then

686: IF (g_po_wf_debug = 'Y') THEN
687: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey, l_progress);
688: END IF;
689:
690: if (l_approver_type = ame_util.posOrigSystem) then
691: l_current_approver.orig_system := ame_util.posOrigSystem;
692: elsif (l_approver_type = ame_util.fndUserOrigSystem) then
693: l_current_approver.orig_system := ame_util.fndUserOrigSystem;
694: else

Line 691: l_current_approver.orig_system := ame_util.posOrigSystem;

687: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey, l_progress);
688: END IF;
689:
690: if (l_approver_type = ame_util.posOrigSystem) then
691: l_current_approver.orig_system := ame_util.posOrigSystem;
692: elsif (l_approver_type = ame_util.fndUserOrigSystem) then
693: l_current_approver.orig_system := ame_util.fndUserOrigSystem;
694: else
695: l_current_approver.orig_system := ame_util.perOrigSystem;

Line 692: elsif (l_approver_type = ame_util.fndUserOrigSystem) then

688: END IF;
689:
690: if (l_approver_type = ame_util.posOrigSystem) then
691: l_current_approver.orig_system := ame_util.posOrigSystem;
692: elsif (l_approver_type = ame_util.fndUserOrigSystem) then
693: l_current_approver.orig_system := ame_util.fndUserOrigSystem;
694: else
695: l_current_approver.orig_system := ame_util.perOrigSystem;
696: l_current_approver.name := po_wf_util_pkg.GetItemAttrText( itemtype => itemType,

Line 693: l_current_approver.orig_system := ame_util.fndUserOrigSystem;

689:
690: if (l_approver_type = ame_util.posOrigSystem) then
691: l_current_approver.orig_system := ame_util.posOrigSystem;
692: elsif (l_approver_type = ame_util.fndUserOrigSystem) then
693: l_current_approver.orig_system := ame_util.fndUserOrigSystem;
694: else
695: l_current_approver.orig_system := ame_util.perOrigSystem;
696: l_current_approver.name := po_wf_util_pkg.GetItemAttrText( itemtype => itemType,
697: itemkey => itemkey,

Line 695: l_current_approver.orig_system := ame_util.perOrigSystem;

691: l_current_approver.orig_system := ame_util.posOrigSystem;
692: elsif (l_approver_type = ame_util.fndUserOrigSystem) then
693: l_current_approver.orig_system := ame_util.fndUserOrigSystem;
694: else
695: l_current_approver.orig_system := ame_util.perOrigSystem;
696: l_current_approver.name := po_wf_util_pkg.GetItemAttrText( itemtype => itemType,
697: itemkey => itemkey,
698: aname => 'APPROVER_USER_NAME');
699: end if;

Line 711: l_current_approver.approval_status := ame_util.approvedStatus;

707: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey, l_progress);
708: END IF;
709:
710: if( p_response = 'APPROVE') then
711: l_current_approver.approval_status := ame_util.approvedStatus;
712: elsif( p_response = 'REJECT') then
713: l_current_approver.approval_status := ame_util.rejectStatus;
714: elsif( p_response = 'TIMEOUT') then
715: l_current_approver.approval_status := ame_util.noResponseStatus;

Line 713: l_current_approver.approval_status := ame_util.rejectStatus;

709:
710: if( p_response = 'APPROVE') then
711: l_current_approver.approval_status := ame_util.approvedStatus;
712: elsif( p_response = 'REJECT') then
713: l_current_approver.approval_status := ame_util.rejectStatus;
714: elsif( p_response = 'TIMEOUT') then
715: l_current_approver.approval_status := ame_util.noResponseStatus;
716: end if;
717:

Line 715: l_current_approver.approval_status := ame_util.noResponseStatus;

711: l_current_approver.approval_status := ame_util.approvedStatus;
712: elsif( p_response = 'REJECT') then
713: l_current_approver.approval_status := ame_util.rejectStatus;
714: elsif( p_response = 'TIMEOUT') then
715: l_current_approver.approval_status := ame_util.noResponseStatus;
716: end if;
717:
718: l_progress := 'Process_Response_Internal: 004 -- p_response :' || p_response ;
719: IF (g_po_wf_debug = 'Y') THEN

Line 808: approverList ame_util.approversTable2;

804:
805: l_approver_group_id NUMBER;
806: l_req_header_id NUMBER;
807: l_process_out VARCHAR2(10);
808: approverList ame_util.approversTable2;
809: ameTransactionType po_document_types.ame_transaction_type%TYPE;
810: l_response_action VARCHAR2(20);
811: l_note VARCHAR2(4000);
812: l_person_id NUMBER;

Line 820: l_ame_exception ame_util.longestStringType;

816: l_first_position_id NUMBER;
817:
818: l_preparer_user_name fnd_user.user_name%TYPE;
819: l_doc_string VARCHAR2(200);
820: l_ame_exception ame_util.longestStringType;
821: l_approver_response varchar2(20);
822: CURSOR l_child_wf (itemtype IN wf_items.parent_item_type%TYPE,itemkey IN wf_items.parent_item_key%TYPE) IS
823: SELECT wfi.item_type, wfi.item_key
824: FROM wf_items wfi,wf_item_activity_statuses wfias

Line 928: if( approverList(i).approval_status = ame_util.beatByFirstResponderStatus

924: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,'group_or_chain_id' || ' ' || approverList(i).group_or_chain_id);
925:
926: END IF;
927:
928: if( approverList(i).approval_status = ame_util.beatByFirstResponderStatus
929: and approverList(i).api_insertion = ame_util.oamGenerated
930: and approverList(i).group_or_chain_id = l_approver_group_id) then
931:
932: l_orig_system := approverList(i).orig_system;

Line 929: and approverList(i).api_insertion = ame_util.oamGenerated

925:
926: END IF;
927:
928: if( approverList(i).approval_status = ame_util.beatByFirstResponderStatus
929: and approverList(i).api_insertion = ame_util.oamGenerated
930: and approverList(i).group_or_chain_id = l_approver_group_id) then
931:
932: l_orig_system := approverList(i).orig_system;
933: l_orig_system_id := approverList(i).orig_system_id;

Line 935: if ( l_orig_system = ame_util.perOrigSystem) then

931:
932: l_orig_system := approverList(i).orig_system;
933: l_orig_system_id := approverList(i).orig_system_id;
934:
935: if ( l_orig_system = ame_util.perOrigSystem) then
936:
937: -- Employee Supervisor Record.
938: l_person_id := l_orig_system_id;
939:

Line 940: elsif ( l_orig_system = ame_util.posOrigSystem) then

936:
937: -- Employee Supervisor Record.
938: l_person_id := l_orig_system_id;
939:
940: elsif ( l_orig_system = ame_util.posOrigSystem) then
941:
942: -- Position Hierarchy Record.
943: begin
944:

Line 968: elsif (l_orig_system = ame_util.fndUserOrigSystem) then

964: WHEN NO_DATA_FOUND THEN
965: l_person_id := -1;
966: end;
967:
968: elsif (l_orig_system = ame_util.fndUserOrigSystem) then
969:
970: -- FND User Record.
971: SELECT employee_id into l_person_id
972: FROM fnd_user

Line 2141: l_ame_exception ame_util.longestStringType;

2137: itemkey in varchar2,
2138: actid in number,
2139: funcmode in varchar2,
2140: resultout out NOCOPY varchar2) IS
2141: l_ame_exception ame_util.longestStringType;
2142: l_progress VARCHAR2(500) := '000';
2143: l_doc_string VARCHAR2(200);
2144: Begin
2145: IF (funcmode = 'RUN') THEN

Line 2214: if (g_next_approvers(l_approver_index).orig_system = ame_util.posOrigSystem) then

2210: where documentId = requisition_header_id;
2211:
2212: while( l_approver_index is not null ) loop
2213: l_position_has_valid_approvers := 'Y';
2214: if (g_next_approvers(l_approver_index).orig_system = ame_util.posOrigSystem) then
2215:
2216: BEGIN
2217:
2218: if (l_first_position_id is not NULL AND l_first_position_id=g_next_approvers(l_approver_index).orig_system_id) then

Line 2257: g_next_approvers(l_approver_index).approval_status := ame_util.noResponseStatus;

2253: return 'N';
2254: else
2255:
2256: /*
2257: g_next_approvers(l_approver_index).approval_status := ame_util.noResponseStatus;
2258: -- Update the Approval status with the response from the approver.
2259: ame_api2.updateApprovalStatus( applicationIdIn =>applicationId,
2260: transactionIdIn =>documentId,
2261: transactionTypeIn =>documentType,

Line 2314: Function is_last_approver_record( documentId NUMBER, documentType VARCHAR2, approverRecord in ame_util.approverRecord2 ) RETURN VARCHAR2 is

2310: --Testing:
2311: --
2312: --End of Comments
2313: -------------------------------------------------------------------------------
2314: Function is_last_approver_record( documentId NUMBER, documentType VARCHAR2, approverRecord in ame_util.approverRecord2 ) RETURN VARCHAR2 is
2315:
2316: l_is_last_approver_record VARCHAR2(1);
2317: l_total_approver_count NUMBER;
2318: l_current_approver_index NUMBER;

Line 2319: tmpApproverList ame_util.approversTable2;

2315:
2316: l_is_last_approver_record VARCHAR2(1);
2317: l_total_approver_count NUMBER;
2318: l_current_approver_index NUMBER;
2319: tmpApproverList ame_util.approversTable2;
2320: l_process_out VARCHAR2(10);
2321:
2322: BEGIN
2323: