DBA Data[Home] [Help]

APPS.POR_AME_APPROVAL_LIST dependencies on PO_REQUISITION_HEADERS

Line 227: -- We also set the columns first_position_id and first_approver_id in po_requisition_headers_all

223:
224: -- Once we get the current first authority approver, we check for the current first authority approver's action type(POS/PER).
225: -- If the first approver record is of position hierarchy action type,
226: -- then we need to find out the position id of the given approver and frame the new approver record.
227: -- We also set the columns first_position_id and first_approver_id in po_requisition_headers_all
228: -- If the first approver record is of emp supervisor action type,
229: -- then we simply frame the new approver record from the input parameters.
230: -- FND users cannot be set as first authority approver. So no need to check for the value 'FND'
231:

Line 253: UPDATE po_requisition_headers_all

249: FND_LOG.string(FND_LOG.level_statement, g_module_prefix || l_api_name, 'Got users position_id :' || tmpApprover.orig_system_id );
250: END IF;
251: end if;
252:
253: UPDATE po_requisition_headers_all
254: SET first_position_id = tmpApprover.orig_system_id, first_approver_id = pPersonId
255: WHERE requisition_header_id = pReqHeaderId;
256:
257: if g_fnd_debug = 'Y' then

Line 896: FROM po_requisition_headers_all

892: if (tmpApprover.orig_system=ame_util.posOrigSystem) THEN
893:
894: SELECT FIRST_POSITION_ID
895: INTO l_first_position_id
896: FROM po_requisition_headers_all
897: WHERE requisition_header_id = pReqHeaderId;
898:
899: if g_fnd_debug = 'Y' then
900: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_STATEMENT) THEN

Line 912: UPDATE po_requisition_headers_all

908: if (tmpApprover.orig_system_id=l_first_position_id) then
909: -- we are suppressing the First Position Approver;
910: -- thus, we need to clear the values from the req headers table.
911:
912: UPDATE po_requisition_headers_all
913: SET first_position_id = NULL, first_approver_id = NULL
914: WHERE requisition_header_id = pReqHeaderId;
915:
916: if g_fnd_debug = 'Y' then

Line 1003: authorizationStatus po_requisition_headers.authorization_status%TYPE;

999:
1000: l_api_name varchar2(50):= 'get_ame_approval_list';
1001: --approverList ame_util.approversTable;
1002: clearListForSavedCart varchar2(1) := 'N';
1003: authorizationStatus po_requisition_headers.authorization_status%TYPE;
1004: preparerId po_requisition_headers.preparer_id%TYPE;
1005: ameTransactionType po_document_types.ame_transaction_type%TYPE;
1006:
1007: l_itemtype po_requisition_headers.wf_item_type%TYPE;

Line 1004: preparerId po_requisition_headers.preparer_id%TYPE;

1000: l_api_name varchar2(50):= 'get_ame_approval_list';
1001: --approverList ame_util.approversTable;
1002: clearListForSavedCart varchar2(1) := 'N';
1003: authorizationStatus po_requisition_headers.authorization_status%TYPE;
1004: preparerId po_requisition_headers.preparer_id%TYPE;
1005: ameTransactionType po_document_types.ame_transaction_type%TYPE;
1006:
1007: l_itemtype po_requisition_headers.wf_item_type%TYPE;
1008: l_itemkey po_requisition_headers.wf_item_key%TYPE;

Line 1007: l_itemtype po_requisition_headers.wf_item_type%TYPE;

1003: authorizationStatus po_requisition_headers.authorization_status%TYPE;
1004: preparerId po_requisition_headers.preparer_id%TYPE;
1005: ameTransactionType po_document_types.ame_transaction_type%TYPE;
1006:
1007: l_itemtype po_requisition_headers.wf_item_type%TYPE;
1008: l_itemkey po_requisition_headers.wf_item_key%TYPE;
1009:
1010: approverList ame_util.approversTable2;
1011: l_process_out VARCHAR2(10);

Line 1008: l_itemkey po_requisition_headers.wf_item_key%TYPE;

1004: preparerId po_requisition_headers.preparer_id%TYPE;
1005: ameTransactionType po_document_types.ame_transaction_type%TYPE;
1006:
1007: l_itemtype po_requisition_headers.wf_item_type%TYPE;
1008: l_itemkey po_requisition_headers.wf_item_key%TYPE;
1009:
1010: approverList ame_util.approversTable2;
1011: l_process_out VARCHAR2(10);
1012:

Line 1036: FROM po_requisition_headers_all

1032:
1033: if (pDefaultFlag = -1) then
1034: SELECT wf_item_type, wf_item_key
1035: INTO l_itemtype, l_itemkey
1036: FROM po_requisition_headers_all
1037: WHERE requisition_header_id = pReqHeaderId;
1038: ameTransactionType := PO_WF_UTIL_PKG.GetItemAttrText( itemtype => l_itemtype,
1039: itemkey => l_itemkey,
1040: aname => 'AME_TRANSACTION_TYPE');

Line 1053: from po_requisition_headers

1049: if (pDefaultFlag=1 OR pDefaultFlag=2) then
1050: /* check to see it is not open saved cart */
1051: select authorization_status, preparer_id
1052: into authorizationStatus, preparerId
1053: from po_requisition_headers
1054: where requisition_header_id = pReqHeaderId;
1055:
1056: -- Get the approval list from ame.
1057: -- Based on our function design, we clear the approval list before calling the getAllApprovers7 call.

Line 1106: UPDATE po_requisition_headers_all

1102:
1103: if (clearListForSavedCart = 'Y') then
1104:
1105: -- clear columns since we are rebuilding the approval list
1106: UPDATE po_requisition_headers_all
1107: SET first_position_id = NULL, first_approver_id = NULL
1108: WHERE requisition_header_id = pReqHeaderId;
1109:
1110: if g_fnd_debug = 'Y' then

Line 1149: UPDATE po_requisition_headers_all

1145:
1146: else -- if (pDefaultFlag=2) or (pDefaultFlag=1 and not INCOMPLETE), this will force the reset
1147:
1148: -- clear columns since we are rebuilding the approval list
1149: UPDATE po_requisition_headers_all
1150: SET first_position_id = NULL, first_approver_id = NULL
1151: WHERE requisition_header_id = pReqHeaderId;
1152:
1153: if g_fnd_debug = 'Y' then

Line 1269: l_itemtype po_requisition_headers.wf_item_type%TYPE;

1265: pIsRcoApproval IN BOOLEAN,
1266: xAmeTransactionType OUT NOCOPY VARCHAR2)
1267: return varchar2 IS
1268: isAmeApproval varchar2 (1);
1269: l_itemtype po_requisition_headers.wf_item_type%TYPE;
1270: l_itemkey po_requisition_headers.wf_item_key%TYPE;
1271:
1272: BEGIN
1273:

Line 1270: l_itemkey po_requisition_headers.wf_item_key%TYPE;

1266: xAmeTransactionType OUT NOCOPY VARCHAR2)
1267: return varchar2 IS
1268: isAmeApproval varchar2 (1);
1269: l_itemtype po_requisition_headers.wf_item_type%TYPE;
1270: l_itemkey po_requisition_headers.wf_item_key%TYPE;
1271:
1272: BEGIN
1273:
1274: if (pIsRcoApproval) then

Line 1288: FROM po_requisition_headers_all

1284: request_status NOT IN ('ACCEPTED', 'REJECTED');
1285: else
1286: SELECT wf_item_type, wf_item_key
1287: INTO l_itemtype, l_itemkey
1288: FROM po_requisition_headers_all
1289: WHERE requisition_header_id = pReqHeaderId;
1290: end if;
1291:
1292: isAmeApproval := PO_WF_UTIL_PKG.GetItemAttrText( itemtype => l_itemtype,

Line 1335: authorizationStatus po_requisition_headers_all.authorization_status%TYPE;

1331: hasApprovalAction varchar2(1);
1332: approverCount number;
1333: approverList ame_util.approversTable2;
1334: ameTransactionType po_document_types.ame_transaction_type%TYPE;
1335: authorizationStatus po_requisition_headers_all.authorization_status%TYPE;
1336: isRcoApproval boolean := false;
1337: changeRequestExist number := 0;
1338: l_process_out VARCHAR2(10);
1339:

Line 1354: from po_requisition_headers_all

1350:
1351: begin
1352: select authorization_status
1353: into authorizationStatus
1354: from po_requisition_headers_all
1355: where requisition_header_id = pReqHeaderId;
1356: exception
1357: when others then
1358: if g_fnd_debug = 'Y' then

Line 1840: lookupCode po_requisition_headers.type_lookup_code%TYPE;

1836: l_api_name varchar2(50):= 'getAmeTransactionType';
1837: changeRequestExist number := 0;
1838: docType po_document_types.document_type_code%TYPE;
1839: docSubType po_document_types.document_subtype%TYPE;
1840: lookupCode po_requisition_headers.type_lookup_code%TYPE;
1841: orgId NUMBER;
1842:
1843: begin
1844:

Line 1878: FROM po_requisition_headers_all

1874: docSubType :='REQUISITION';
1875:
1876: SELECT org_id
1877: INTO orgId
1878: FROM po_requisition_headers_all
1879: WHERE requisition_header_id = pReqHeaderId;
1880:
1881: else
1882: docType := 'REQUISITION';

Line 1886: FROM po_requisition_headers_all

1882: docType := 'REQUISITION';
1883: begin
1884: SELECT type_lookup_code, org_id
1885: INTO lookupCode, orgId
1886: FROM po_requisition_headers_all
1887: WHERE requisition_header_id = pReqHeaderId;
1888:
1889: exception
1890: when others then

Line 2004: from po_requisition_headers_all

2000: end if;
2001:
2002: select PREPARER_ID
2003: into l_preparer_id
2004: from po_requisition_headers_all
2005: where reqHeaderId = requisition_header_id;
2006:
2007: if g_fnd_debug = 'Y' then
2008: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_STATEMENT) THEN

Line 2393: l_itemtype po_requisition_headers.wf_item_type%TYPE;

2389: x_approval_status out NOCOPY varchar2,
2390: x_is_rco_approval out NOCOPY varchar2
2391: ) IS
2392:
2393: l_itemtype po_requisition_headers.wf_item_type%TYPE;
2394: l_itemkey po_requisition_headers.wf_item_key%TYPE;
2395: l_api_name varchar2(50):= 'retrieve_approval_info';
2396:
2397: l_change_request_group_id NUMBER;

Line 2394: l_itemkey po_requisition_headers.wf_item_key%TYPE;

2390: x_is_rco_approval out NOCOPY varchar2
2391: ) IS
2392:
2393: l_itemtype po_requisition_headers.wf_item_type%TYPE;
2394: l_itemkey po_requisition_headers.wf_item_key%TYPE;
2395: l_api_name varchar2(50):= 'retrieve_approval_info';
2396:
2397: l_change_request_group_id NUMBER;
2398:

Line 2420: from po_requisition_headers_all

2416:
2417:
2418: select authorization_status, wf_item_type, wf_item_key
2419: into x_approval_status, l_itemtype, l_itemkey
2420: from po_requisition_headers_all
2421: where requisition_header_id = p_req_header_id;
2422:
2423: if g_fnd_debug = 'Y' then
2424: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_STATEMENT) THEN

Line 2681: l_itemtype po_requisition_headers.wf_item_type%TYPE;

2677:
2678: l_api_name varchar2(50):= 'get_ame_approval_list_history';
2679: ameTransactionType po_document_types.ame_transaction_type%TYPE;
2680:
2681: l_itemtype po_requisition_headers.wf_item_type%TYPE;
2682: l_itemkey po_requisition_headers.wf_item_key%TYPE;
2683:
2684: approverList ame_util.approversTable2;
2685: l_process_out VARCHAR2(10);

Line 2682: l_itemkey po_requisition_headers.wf_item_key%TYPE;

2678: l_api_name varchar2(50):= 'get_ame_approval_list_history';
2679: ameTransactionType po_document_types.ame_transaction_type%TYPE;
2680:
2681: l_itemtype po_requisition_headers.wf_item_type%TYPE;
2682: l_itemkey po_requisition_headers.wf_item_key%TYPE;
2683:
2684: approverList ame_util.approversTable2;
2685: l_process_out VARCHAR2(10);
2686:

Line 2703: l_authorizationStatus po_requisition_headers_all.AUTHORIZATION_STATUS%type;

2699: l_first_position_id NUMBER;
2700: l_org_id NUMBER;
2701: p_doc_type po_document_types_all_b.document_type_code%type;
2702: p_doc_subtype po_document_types_all_b.document_subtype%type;
2703: l_authorizationStatus po_requisition_headers_all.AUTHORIZATION_STATUS%type;
2704: l_change_pending_flag po_requisition_headers_all.CHANGE_PENDING_FLAG%type;
2705: l_approval_reqd_flag PO_CHANGE_REQUESTS.APPROVAL_REQUIRED_FLAG%type;
2706:
2707: BEGIN

Line 2704: l_change_pending_flag po_requisition_headers_all.CHANGE_PENDING_FLAG%type;

2700: l_org_id NUMBER;
2701: p_doc_type po_document_types_all_b.document_type_code%type;
2702: p_doc_subtype po_document_types_all_b.document_subtype%type;
2703: l_authorizationStatus po_requisition_headers_all.AUTHORIZATION_STATUS%type;
2704: l_change_pending_flag po_requisition_headers_all.CHANGE_PENDING_FLAG%type;
2705: l_approval_reqd_flag PO_CHANGE_REQUESTS.APPROVAL_REQUIRED_FLAG%type;
2706:
2707: BEGIN
2708:

Line 2729: from po_requisition_headers_all

2725: l_first_approver_id,
2726: l_org_id,
2727: l_authorizationStatus,
2728: l_change_pending_flag
2729: from po_requisition_headers_all
2730: where pReqHeaderId = requisition_header_id;
2731:
2732: --PO_MOAC_UTILS_PVT.set_org_context(l_org_id);
2733:

Line 2799: FROM po_requisition_headers_all

2795:
2796: begin
2797: SELECT type_lookup_code
2798: INTO p_doc_subtype
2799: FROM po_requisition_headers_all
2800: WHERE requisition_header_id = pReqHeaderId;
2801:
2802: exception
2803: when others then

Line 3129: l_itemtype po_requisition_headers.wf_item_type%TYPE;

3125: x_approverId OUT NOCOPY NUMBER,
3126: x_approverName OUT NOCOPY VARCHAR2
3127: ) IS
3128:
3129: l_itemtype po_requisition_headers.wf_item_type%TYPE;
3130: l_itemkey po_requisition_headers.wf_item_key%TYPE;
3131: l_ameTransactionType po_document_types.ame_transaction_type%TYPE;
3132: l_completeYNO varchar2(100);
3133:

Line 3130: l_itemkey po_requisition_headers.wf_item_key%TYPE;

3126: x_approverName OUT NOCOPY VARCHAR2
3127: ) IS
3128:
3129: l_itemtype po_requisition_headers.wf_item_type%TYPE;
3130: l_itemkey po_requisition_headers.wf_item_key%TYPE;
3131: l_ameTransactionType po_document_types.ame_transaction_type%TYPE;
3132: l_completeYNO varchar2(100);
3133:
3134: l_approversList ame_util.approversTable2;

Line 3168: from po_requisition_headers_all

3164: x_progress := '003';
3165:
3166: select PREPARER_ID
3167: into l_preparer_id
3168: from po_requisition_headers_all
3169: where pReqHeaderId = requisition_header_id;
3170:
3171: x_progress := '004';
3172:

Line 3279: from po_requisition_headers_all

3275: end if;
3276:
3277: select first_position_id, first_approver_id
3278: into l_first_position_id, l_first_approver_id
3279: from po_requisition_headers_all
3280: where p_reqHeaderId = requisition_header_id;
3281:
3282: if p_logFlag = 'Y' then
3283: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_STATEMENT) THEN