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 72: l_orig_system wf_users.orig_system%TYPE := ame_util.perOrigSystem;

68: l_document_subtype PO_DOCUMENT_TYPES.DOCUMENT_SUBTYPE%TYPE;
69: l_next_approver_id NUMBER;
70: l_next_approver_user_name fnd_user.user_name%TYPE;
71: l_next_approver_disp_name wf_users.display_name%TYPE;
72: l_orig_system wf_users.orig_system%TYPE := ame_util.perOrigSystem;
73: l_sequence_num NUMBER;
74: l_approver_type VARCHAR2(30);
75:
76: l_doc_string varchar2(200);

Line 80: l_next_approver ame_util.approverRecord;

76: l_doc_string varchar2(200);
77: l_preparer_user_name fnd_user.user_name%TYPE;
78: l_org_id number;
79:
80: l_next_approver ame_util.approverRecord;
81: l_insertion_type VARCHAR2(30);
82: l_authority_type VARCHAR2(30);
83: l_transaction_type PO_DOCUMENT_TYPES.AME_TRANSACTION_TYPE%TYPE;
84:

Line 89: l_ame_exception ame_util.longestStringType;

85: l_completeYNO varchar2(100);
86: l_position_has_valid_approvers varchar2(10);
87: l_need_to_get_next_approver boolean;
88:
89: l_ame_exception ame_util.longestStringType;
90: l_ame_transaction_id po_headers_all.ame_approval_id%TYPE;
91:
92: BEGIN
93: l_progress := 'In Get_Next_Approver';

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

162: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey, l_progress);
163: END IF;
164:
165:
166: ame_util2.detailedApprovalStatusFlagYN := ame_util.booleanTrue;
167: ame_api2.getNextApprovers4( applicationIdIn=>applicationId,
168: transactionIdIn=>l_document_id,
169: transactionTypeIn=>l_transaction_type,
170: approvalProcessCompleteYNOut=>l_completeYNO,

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

584: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey, l_progress);
585: END IF;
586:
587: -- Check whether Position Hierarchy or Employee-Sup Hierarchy setup or FND users.
588: if (g_next_approvers(l_approver_index).orig_system = ame_util.perOrigSystem) then
589: l_next_approver_id := g_next_approvers(l_approver_index).orig_system_id;
590: elsif (g_next_approvers(l_approver_index).orig_system = ame_util.posOrigSystem) then
591:
592: begin

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

586:
587: -- Check whether Position Hierarchy or Employee-Sup Hierarchy setup or FND users.
588: if (g_next_approvers(l_approver_index).orig_system = ame_util.perOrigSystem) then
589: l_next_approver_id := g_next_approvers(l_approver_index).orig_system_id;
590: elsif (g_next_approvers(l_approver_index).orig_system = ame_util.posOrigSystem) then
591:
592: begin
593:
594: -- CLM Apprvl --

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

634: WHEN NO_DATA_FOUND THEN
635: RAISE;
636: END;
637:
638: elsif (g_next_approvers(l_approver_index).orig_system = ame_util.fndUserOrigSystem) then
639: SELECT employee_id
640: into l_next_approver_id
641: FROM fnd_user
642: WHERE user_id = g_next_approvers(l_approver_index).orig_system_id

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

650: t_po_varval(18) := g_next_approvers(l_approver_index).orig_system;
651:
652:
653:
654: WF_DIRECTORY.GetUserName(ame_util.perOrigSystem, l_next_approver_id, l_next_approver_user_name, l_next_approver_disp_name);
655:
656: l_progress := 'Launch_Parallel_Approval: 004 -- Next Approver User Name -- display Name:' || l_next_approver_user_name || ' -- ' || l_next_approver_disp_name;
657: IF (g_po_wf_debug = 'Y') THEN
658: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey, l_progress);

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

657: IF (g_po_wf_debug = 'Y') THEN
658: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey, l_progress);
659: END IF;
660: --bug6843383 start
661: IF (g_next_approvers(l_approver_index).orig_system = ame_util.perOrigSystem) then
662: t_req_varname(27) := 'APPROVER_USER_NAME';
663: t_req_varval(27) := g_next_approvers(l_approver_index).name;
664:
665: t_po_varname(19) := 'APPROVER_USER_NAME';

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

691: po_wf_debug_pkg.insert_debug(itemtype,itemkey,l_progress);
692: END IF;
693: t_req_varname(29) := 'AME_IS_FYI_APPROVER';
694: t_po_varname(21) := 'IS_FYI_APPROVER';
695: if (g_next_approvers(l_approver_index).approver_category = ame_util.fyiApproverCategory) then
696: t_req_varval(29) :='Y';
697: t_po_varval(21) := 'Y';
698: l_has_fyi_app := 'Y';
699: l_start_block_activity := 'N';

Line 995: l_current_approver ame_util.approverRecord2;

991:
992: l_progress VARCHAR2(500) := '000';
993: l_document_id number;
994: l_transaction_type PO_DOCUMENT_TYPES.AME_TRANSACTION_TYPE%TYPE;
995: l_current_approver ame_util.approverRecord2;
996: l_forwardee ame_util.approverRecord2; -- CLM Apprvl
997: l_approver_posoition_id number;
998: l_approver_type varchar2(10);
999: l_error_code NUMBER;

Line 996: l_forwardee ame_util.approverRecord2; -- CLM Apprvl

992: l_progress VARCHAR2(500) := '000';
993: l_document_id number;
994: l_transaction_type PO_DOCUMENT_TYPES.AME_TRANSACTION_TYPE%TYPE;
995: l_current_approver ame_util.approverRecord2;
996: l_forwardee ame_util.approverRecord2; -- CLM Apprvl
997: l_approver_posoition_id number;
998: l_approver_type varchar2(10);
999: l_error_code NUMBER;
1000: l_error_message ame_util.longestStringType;

Line 1000: l_error_message ame_util.longestStringType;

996: l_forwardee ame_util.approverRecord2; -- CLM Apprvl
997: l_approver_posoition_id number;
998: l_approver_type varchar2(10);
999: l_error_code NUMBER;
1000: l_error_message ame_util.longestStringType;
1001: l_parent_item_type wf_items.parent_item_type%TYPE;
1002: l_parent_item_key wf_items.parent_item_key%TYPE;
1003: l_document_type PO_DOCUMENT_TYPES.document_type_code%TYPE; --
1004: l_ame_transaction_id PO_HEADERS_ALL.ame_approval_id%TYPE; --

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

1040: IF (g_po_wf_debug = 'Y') THEN
1041: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey, l_progress);
1042: END IF;
1043:
1044: if (l_approver_type = ame_util.posOrigSystem) then
1045: l_current_approver.orig_system := ame_util.posOrigSystem;
1046: l_forwardee.orig_system := ame_util.posOrigSystem;
1047: elsif (l_approver_type = ame_util.fndUserOrigSystem) then
1048: l_current_approver.orig_system := ame_util.fndUserOrigSystem;

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

1041: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey, l_progress);
1042: END IF;
1043:
1044: if (l_approver_type = ame_util.posOrigSystem) then
1045: l_current_approver.orig_system := ame_util.posOrigSystem;
1046: l_forwardee.orig_system := ame_util.posOrigSystem;
1047: elsif (l_approver_type = ame_util.fndUserOrigSystem) then
1048: l_current_approver.orig_system := ame_util.fndUserOrigSystem;
1049: l_forwardee.orig_system := ame_util.fndUserOrigSystem;

Line 1046: l_forwardee.orig_system := ame_util.posOrigSystem;

1042: END IF;
1043:
1044: if (l_approver_type = ame_util.posOrigSystem) then
1045: l_current_approver.orig_system := ame_util.posOrigSystem;
1046: l_forwardee.orig_system := ame_util.posOrigSystem;
1047: elsif (l_approver_type = ame_util.fndUserOrigSystem) then
1048: l_current_approver.orig_system := ame_util.fndUserOrigSystem;
1049: l_forwardee.orig_system := ame_util.fndUserOrigSystem;
1050: else

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

1043:
1044: if (l_approver_type = ame_util.posOrigSystem) then
1045: l_current_approver.orig_system := ame_util.posOrigSystem;
1046: l_forwardee.orig_system := ame_util.posOrigSystem;
1047: elsif (l_approver_type = ame_util.fndUserOrigSystem) then
1048: l_current_approver.orig_system := ame_util.fndUserOrigSystem;
1049: l_forwardee.orig_system := ame_util.fndUserOrigSystem;
1050: else
1051: l_current_approver.orig_system := ame_util.perOrigSystem;

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

1044: if (l_approver_type = ame_util.posOrigSystem) then
1045: l_current_approver.orig_system := ame_util.posOrigSystem;
1046: l_forwardee.orig_system := ame_util.posOrigSystem;
1047: elsif (l_approver_type = ame_util.fndUserOrigSystem) then
1048: l_current_approver.orig_system := ame_util.fndUserOrigSystem;
1049: l_forwardee.orig_system := ame_util.fndUserOrigSystem;
1050: else
1051: l_current_approver.orig_system := ame_util.perOrigSystem;
1052: l_current_approver.name := po_wf_util_pkg.GetItemAttrText( itemtype => itemType,

Line 1049: l_forwardee.orig_system := ame_util.fndUserOrigSystem;

1045: l_current_approver.orig_system := ame_util.posOrigSystem;
1046: l_forwardee.orig_system := ame_util.posOrigSystem;
1047: elsif (l_approver_type = ame_util.fndUserOrigSystem) then
1048: l_current_approver.orig_system := ame_util.fndUserOrigSystem;
1049: l_forwardee.orig_system := ame_util.fndUserOrigSystem;
1050: else
1051: l_current_approver.orig_system := ame_util.perOrigSystem;
1052: l_current_approver.name := po_wf_util_pkg.GetItemAttrText( itemtype => itemType,
1053: itemkey => itemkey,

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

1047: elsif (l_approver_type = ame_util.fndUserOrigSystem) then
1048: l_current_approver.orig_system := ame_util.fndUserOrigSystem;
1049: l_forwardee.orig_system := ame_util.fndUserOrigSystem;
1050: else
1051: l_current_approver.orig_system := ame_util.perOrigSystem;
1052: l_current_approver.name := po_wf_util_pkg.GetItemAttrText( itemtype => itemType,
1053: itemkey => itemkey,
1054: aname => 'APPROVER_USER_NAME');
1055: -- CLM Apprvl

Line 1056: l_forwardee.orig_system := ame_util.perOrigSystem;

1052: l_current_approver.name := po_wf_util_pkg.GetItemAttrText( itemtype => itemType,
1053: itemkey => itemkey,
1054: aname => 'APPROVER_USER_NAME');
1055: -- CLM Apprvl
1056: l_forwardee.orig_system := ame_util.perOrigSystem;
1057: l_forwardee.name := po_wf_util_pkg.GetItemAttrText( itemtype => itemType,
1058: itemkey => itemkey,
1059: aname => 'FORWARD_TO_USERNAME_RESPONSE');
1060:

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

1072: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey, l_progress);
1073: END IF;
1074:
1075: if( p_response = 'APPROVE') then
1076: l_current_approver.approval_status := ame_util.approvedStatus;
1077: elsif( p_response = 'REJECT') then
1078: l_current_approver.approval_status := ame_util.rejectStatus;
1079: elsif( p_response = 'TIMEOUT') then
1080: l_current_approver.approval_status := ame_util.noResponseStatus;

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

1074:
1075: if( p_response = 'APPROVE') then
1076: l_current_approver.approval_status := ame_util.approvedStatus;
1077: elsif( p_response = 'REJECT') then
1078: l_current_approver.approval_status := ame_util.rejectStatus;
1079: elsif( p_response = 'TIMEOUT') then
1080: l_current_approver.approval_status := ame_util.noResponseStatus;
1081: elsif( p_response = 'FORWARD') then -- CLM Apprvl
1082: l_current_approver.approval_status := ame_util.forwardStatus;

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

1076: l_current_approver.approval_status := ame_util.approvedStatus;
1077: elsif( p_response = 'REJECT') then
1078: l_current_approver.approval_status := ame_util.rejectStatus;
1079: elsif( p_response = 'TIMEOUT') then
1080: l_current_approver.approval_status := ame_util.noResponseStatus;
1081: elsif( p_response = 'FORWARD') then -- CLM Apprvl
1082: l_current_approver.approval_status := ame_util.forwardStatus;
1083: l_progress := 'Process_Response_Internal: 004 -- l_forwardee.orig_system_id :' ||
1084: l_forwardee.orig_system_id||', l_forwardee.name: '||l_forwardee.name ;

Line 1082: l_current_approver.approval_status := ame_util.forwardStatus;

1078: l_current_approver.approval_status := ame_util.rejectStatus;
1079: elsif( p_response = 'TIMEOUT') then
1080: l_current_approver.approval_status := ame_util.noResponseStatus;
1081: elsif( p_response = 'FORWARD') then -- CLM Apprvl
1082: l_current_approver.approval_status := ame_util.forwardStatus;
1083: l_progress := 'Process_Response_Internal: 004 -- l_forwardee.orig_system_id :' ||
1084: l_forwardee.orig_system_id||', l_forwardee.name: '||l_forwardee.name ;
1085: IF (g_po_wf_debug = 'Y') THEN
1086: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey, l_progress);

Line 1089: l_current_approver.approval_status := ame_util.approveAndForwardStatus;

1085: IF (g_po_wf_debug = 'Y') THEN
1086: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey, l_progress);
1087: END IF;
1088: elsif( p_response = 'APPROVE AND FORWARD') then -- CLM Apprvl
1089: l_current_approver.approval_status := ame_util.approveAndForwardStatus;
1090: --CLM bug11736458 - exception response must be sent back to AME in case of error during PDF generation in Parallel approval process.
1091: elsif( p_response = 'EXCEPTION') then
1092: l_current_approver.approval_status := ame_util.exceptionStatus;
1093: end if;

Line 1092: l_current_approver.approval_status := ame_util.exceptionStatus;

1088: elsif( p_response = 'APPROVE AND FORWARD') then -- CLM Apprvl
1089: l_current_approver.approval_status := ame_util.approveAndForwardStatus;
1090: --CLM bug11736458 - exception response must be sent back to AME in case of error during PDF generation in Parallel approval process.
1091: elsif( p_response = 'EXCEPTION') then
1092: l_current_approver.approval_status := ame_util.exceptionStatus;
1093: end if;
1094:
1095: l_progress := 'Process_Response_Internal: 005 -- p_response :' || p_response ;
1096: IF (g_po_wf_debug = 'Y') THEN

Line 1210: approverList ame_util.approversTable2;

1206:
1207: l_approver_group_id NUMBER;
1208: l_req_header_id NUMBER;
1209: l_process_out VARCHAR2(10);
1210: approverList ame_util.approversTable2;
1211: ameTransactionType po_document_types.ame_transaction_type%TYPE;
1212: l_response_action VARCHAR2(20);
1213: l_note VARCHAR2(4000);
1214: l_person_id NUMBER;

Line 1222: l_ame_exception ame_util.longestStringType;

1218: l_first_position_id NUMBER := null;
1219:
1220: l_preparer_user_name fnd_user.user_name%TYPE;
1221: l_doc_string VARCHAR2(200);
1222: l_ame_exception ame_util.longestStringType;
1223: l_approver_response varchar2(20);
1224: l_transaction_type po_document_types.ame_transaction_type%TYPE; --
1225: l_ame_transaction_id NUMBER; --
1226: l_document_type PO_DOCUMENT_TYPES.document_type_code%TYPE; --

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

1394: PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,'group_or_chain_id' || ' ' || approverList(i).group_or_chain_id);
1395:
1396: END IF;
1397:
1398: if( approverList(i).approval_status = ame_util.beatByFirstResponderStatus
1399: and approverList(i).api_insertion = ame_util.oamGenerated
1400: and approverList(i).group_or_chain_id = l_approver_group_id) then
1401:
1402: l_orig_system := approverList(i).orig_system;

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

1395:
1396: END IF;
1397:
1398: if( approverList(i).approval_status = ame_util.beatByFirstResponderStatus
1399: and approverList(i).api_insertion = ame_util.oamGenerated
1400: and approverList(i).group_or_chain_id = l_approver_group_id) then
1401:
1402: l_orig_system := approverList(i).orig_system;
1403: l_orig_system_id := approverList(i).orig_system_id;

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

1401:
1402: l_orig_system := approverList(i).orig_system;
1403: l_orig_system_id := approverList(i).orig_system_id;
1404:
1405: if ( l_orig_system = ame_util.perOrigSystem) then
1406:
1407: -- Employee Supervisor Record.
1408: l_person_id := l_orig_system_id;
1409:

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

1406:
1407: -- Employee Supervisor Record.
1408: l_person_id := l_orig_system_id;
1409:
1410: elsif ( l_orig_system = ame_util.posOrigSystem) then
1411:
1412: -- Position Hierarchy Record.
1413: begin
1414:

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

1434: WHEN NO_DATA_FOUND THEN
1435: l_person_id := -1;
1436: end;
1437:
1438: elsif (l_orig_system = ame_util.fndUserOrigSystem) then
1439:
1440: -- FND User Record.
1441: SELECT employee_id into l_person_id
1442: FROM fnd_user

Line 3174: l_ame_exception ame_util.longestStringType;

3170: itemkey in varchar2,
3171: actid in number,
3172: funcmode in varchar2,
3173: resultout out NOCOPY varchar2) IS
3174: l_ame_exception ame_util.longestStringType;
3175: l_progress VARCHAR2(500) := '000';
3176: l_doc_string VARCHAR2(200);
3177: Begin
3178: IF (funcmode = 'RUN') THEN

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

3247:
3248:
3249: while( l_approver_index is not null ) loop
3250: l_position_has_valid_approvers := 'Y';
3251: if (g_next_approvers(l_approver_index).orig_system = ame_util.posOrigSystem) then
3252:
3253: BEGIN
3254:
3255: if (l_first_position_id is not NULL AND l_first_position_id=g_next_approvers(l_approver_index).orig_system_id) then

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

3290: return 'N';
3291: else
3292:
3293: /*
3294: g_next_approvers(l_approver_index).approval_status := ame_util.noResponseStatus;
3295: -- Update the Approval status with the response from the approver.
3296: ame_api2.updateApprovalStatus( applicationIdIn =>applicationId,
3297: transactionIdIn =>documentId,
3298: transactionTypeIn =>documentType,

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

3352: --Testing:
3353: --
3354: --End of Comments
3355: -------------------------------------------------------------------------------
3356: Function is_last_approver_record( documentId NUMBER, documentType VARCHAR2, approverRecord in ame_util.approverRecord2 ) RETURN VARCHAR2 is
3357:
3358: l_is_last_approver_record VARCHAR2(1);
3359: l_total_approver_count NUMBER;
3360: l_current_approver_index NUMBER;

Line 3361: tmpApproverList ame_util.approversTable2;

3357:
3358: l_is_last_approver_record VARCHAR2(1);
3359: l_total_approver_count NUMBER;
3360: l_current_approver_index NUMBER;
3361: tmpApproverList ame_util.approversTable2;
3362: l_process_out VARCHAR2(10);
3363:
3364: BEGIN
3365: