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 927: FROM po_requisition_headers_all

923: if (tmpApprover.orig_system=ame_util.posOrigSystem) THEN
924:
925: SELECT FIRST_POSITION_ID
926: INTO l_first_position_id
927: FROM po_requisition_headers_all
928: WHERE requisition_header_id = pReqHeaderId;
929:
930: if g_fnd_debug = 'Y' then
931: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_STATEMENT) THEN

Line 943: UPDATE po_requisition_headers_all

939: if (tmpApprover.orig_system_id=l_first_position_id) then
940: -- we are suppressing the First Position Approver;
941: -- thus, we need to clear the values from the req headers table.
942:
943: UPDATE po_requisition_headers_all
944: SET first_position_id = NULL, first_approver_id = NULL
945: WHERE requisition_header_id = pReqHeaderId;
946:
947: if g_fnd_debug = 'Y' then

Line 1034: authorizationStatus po_requisition_headers.authorization_status%TYPE;

1030:
1031: l_api_name varchar2(50):= 'get_ame_approval_list';
1032: --approverList ame_util.approversTable;
1033: clearListForSavedCart varchar2(1) := 'N';
1034: authorizationStatus po_requisition_headers.authorization_status%TYPE;
1035: preparerId po_requisition_headers.preparer_id%TYPE;
1036: ameTransactionType po_document_types.ame_transaction_type%TYPE;
1037:
1038: l_itemtype po_requisition_headers.wf_item_type%TYPE;

Line 1035: preparerId po_requisition_headers.preparer_id%TYPE;

1031: l_api_name varchar2(50):= 'get_ame_approval_list';
1032: --approverList ame_util.approversTable;
1033: clearListForSavedCart varchar2(1) := 'N';
1034: authorizationStatus po_requisition_headers.authorization_status%TYPE;
1035: preparerId po_requisition_headers.preparer_id%TYPE;
1036: ameTransactionType po_document_types.ame_transaction_type%TYPE;
1037:
1038: l_itemtype po_requisition_headers.wf_item_type%TYPE;
1039: l_itemkey po_requisition_headers.wf_item_key%TYPE;

Line 1038: l_itemtype po_requisition_headers.wf_item_type%TYPE;

1034: authorizationStatus po_requisition_headers.authorization_status%TYPE;
1035: preparerId po_requisition_headers.preparer_id%TYPE;
1036: ameTransactionType po_document_types.ame_transaction_type%TYPE;
1037:
1038: l_itemtype po_requisition_headers.wf_item_type%TYPE;
1039: l_itemkey po_requisition_headers.wf_item_key%TYPE;
1040:
1041: approverList ame_util.approversTable2;
1042: l_process_out VARCHAR2(10);

Line 1039: l_itemkey po_requisition_headers.wf_item_key%TYPE;

1035: preparerId po_requisition_headers.preparer_id%TYPE;
1036: ameTransactionType po_document_types.ame_transaction_type%TYPE;
1037:
1038: l_itemtype po_requisition_headers.wf_item_type%TYPE;
1039: l_itemkey po_requisition_headers.wf_item_key%TYPE;
1040:
1041: approverList ame_util.approversTable2;
1042: l_process_out VARCHAR2(10);
1043: l_progress VARCHAR2(10);

Line 1069: FROM po_requisition_headers_all

1065:
1066: if (pDefaultFlag = -1) then
1067: SELECT wf_item_type, wf_item_key
1068: INTO l_itemtype, l_itemkey
1069: FROM po_requisition_headers_all
1070: WHERE requisition_header_id = pReqHeaderId;
1071: ameTransactionType := PO_WF_UTIL_PKG.GetItemAttrText( itemtype => l_itemtype,
1072: itemkey => l_itemkey,
1073: aname => 'AME_TRANSACTION_TYPE');

Line 1086: from po_requisition_headers

1082: if (pDefaultFlag=1 OR pDefaultFlag=2) then
1083: /* check to see it is not open saved cart */
1084: select authorization_status, preparer_id
1085: into authorizationStatus, preparerId
1086: from po_requisition_headers
1087: where requisition_header_id = pReqHeaderId;
1088:
1089: -- Get the approval list from ame.
1090: -- Based on our function design, we clear the approval list before calling the getAllApprovers7 call.

Line 1165: UPDATE po_requisition_headers_all

1161:
1162: if (clearListForSavedCart = 'Y') then
1163:
1164: -- clear columns since we are rebuilding the approval list
1165: UPDATE po_requisition_headers_all
1166: SET first_position_id = NULL, first_approver_id = NULL
1167: WHERE requisition_header_id = pReqHeaderId;
1168:
1169: if g_fnd_debug = 'Y' then

Line 1208: UPDATE po_requisition_headers_all

1204:
1205: else -- if (pDefaultFlag=2) or (pDefaultFlag=1 and not INCOMPLETE), this will force the reset
1206:
1207: -- clear columns since we are rebuilding the approval list
1208: UPDATE po_requisition_headers_all
1209: SET first_position_id = NULL, first_approver_id = NULL
1210: WHERE requisition_header_id = pReqHeaderId;
1211:
1212: if g_fnd_debug = 'Y' then

Line 1328: l_itemtype po_requisition_headers.wf_item_type%TYPE;

1324: pIsRcoApproval IN BOOLEAN,
1325: xAmeTransactionType OUT NOCOPY VARCHAR2)
1326: return varchar2 IS
1327: isAmeApproval varchar2 (1);
1328: l_itemtype po_requisition_headers.wf_item_type%TYPE;
1329: l_itemkey po_requisition_headers.wf_item_key%TYPE;
1330:
1331: BEGIN
1332:

Line 1329: l_itemkey po_requisition_headers.wf_item_key%TYPE;

1325: xAmeTransactionType OUT NOCOPY VARCHAR2)
1326: return varchar2 IS
1327: isAmeApproval varchar2 (1);
1328: l_itemtype po_requisition_headers.wf_item_type%TYPE;
1329: l_itemkey po_requisition_headers.wf_item_key%TYPE;
1330:
1331: BEGIN
1332:
1333: if (pIsRcoApproval) then

Line 1347: FROM po_requisition_headers_all

1343: request_status NOT IN ('ACCEPTED', 'REJECTED');
1344: else
1345: SELECT wf_item_type, wf_item_key
1346: INTO l_itemtype, l_itemkey
1347: FROM po_requisition_headers_all
1348: WHERE requisition_header_id = pReqHeaderId;
1349: end if;
1350:
1351: isAmeApproval := PO_WF_UTIL_PKG.GetItemAttrText( itemtype => l_itemtype,

Line 1394: authorizationStatus po_requisition_headers_all.authorization_status%TYPE;

1390: hasApprovalAction varchar2(1);
1391: approverCount number;
1392: approverList ame_util.approversTable2;
1393: ameTransactionType po_document_types.ame_transaction_type%TYPE;
1394: authorizationStatus po_requisition_headers_all.authorization_status%TYPE;
1395: isRcoApproval boolean := false;
1396: changeRequestExist number := 0;
1397: l_process_out VARCHAR2(10);
1398:

Line 1413: from po_requisition_headers_all

1409:
1410: begin
1411: select authorization_status
1412: into authorizationStatus
1413: from po_requisition_headers_all
1414: where requisition_header_id = pReqHeaderId;
1415: exception
1416: when others then
1417: if g_fnd_debug = 'Y' then

Line 1905: lookupCode po_requisition_headers.type_lookup_code%TYPE;

1901: l_api_name varchar2(50):= 'getAmeTransactionType';
1902: changeRequestExist number := 0;
1903: docType po_document_types.document_type_code%TYPE;
1904: docSubType po_document_types.document_subtype%TYPE;
1905: lookupCode po_requisition_headers.type_lookup_code%TYPE;
1906: orgId NUMBER;
1907:
1908: begin
1909:

Line 1943: FROM po_requisition_headers_all

1939: docSubType :='REQUISITION';
1940:
1941: SELECT org_id
1942: INTO orgId
1943: FROM po_requisition_headers_all
1944: WHERE requisition_header_id = pReqHeaderId;
1945:
1946: else
1947: docType := 'REQUISITION';

Line 1951: FROM po_requisition_headers_all

1947: docType := 'REQUISITION';
1948: begin
1949: SELECT type_lookup_code, org_id
1950: INTO lookupCode, orgId
1951: FROM po_requisition_headers_all
1952: WHERE requisition_header_id = pReqHeaderId;
1953:
1954: exception
1955: when others then

Line 2071: from po_requisition_headers_all

2067: -- bug 9559404: Commented the following code as l_preparer_id is no longer needed
2068: -- bug 14591082:uncommented this piece of code to get preparer id
2069: select PREPARER_ID
2070: into l_preparer_id
2071: from po_requisition_headers_all
2072: where reqHeaderId = requisition_header_id;
2073:
2074: if g_fnd_debug = 'Y' then
2075: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_STATEMENT) THEN

Line 2463: l_itemtype po_requisition_headers.wf_item_type%TYPE;

2459: x_approval_status out NOCOPY varchar2,
2460: x_is_rco_approval out NOCOPY varchar2
2461: ) IS
2462:
2463: l_itemtype po_requisition_headers.wf_item_type%TYPE;
2464: l_itemkey po_requisition_headers.wf_item_key%TYPE;
2465: l_api_name varchar2(50):= 'retrieve_approval_info';
2466:
2467: l_change_request_group_id NUMBER;

Line 2464: l_itemkey po_requisition_headers.wf_item_key%TYPE;

2460: x_is_rco_approval out NOCOPY varchar2
2461: ) IS
2462:
2463: l_itemtype po_requisition_headers.wf_item_type%TYPE;
2464: l_itemkey po_requisition_headers.wf_item_key%TYPE;
2465: l_api_name varchar2(50):= 'retrieve_approval_info';
2466:
2467: l_change_request_group_id NUMBER;
2468:

Line 2490: from po_requisition_headers_all

2486:
2487:
2488: select authorization_status, wf_item_type, wf_item_key
2489: into x_approval_status, l_itemtype, l_itemkey
2490: from po_requisition_headers_all
2491: where requisition_header_id = p_req_header_id;
2492:
2493: if g_fnd_debug = 'Y' then
2494: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_STATEMENT) THEN

Line 2751: l_itemtype po_requisition_headers.wf_item_type%TYPE;

2747:
2748: l_api_name varchar2(50):= 'get_ame_approval_list_history';
2749: ameTransactionType po_document_types.ame_transaction_type%TYPE;
2750:
2751: l_itemtype po_requisition_headers.wf_item_type%TYPE;
2752: l_itemkey po_requisition_headers.wf_item_key%TYPE;
2753:
2754: approverList ame_util.approversTable2;
2755: l_process_out VARCHAR2(10);

Line 2752: l_itemkey po_requisition_headers.wf_item_key%TYPE;

2748: l_api_name varchar2(50):= 'get_ame_approval_list_history';
2749: ameTransactionType po_document_types.ame_transaction_type%TYPE;
2750:
2751: l_itemtype po_requisition_headers.wf_item_type%TYPE;
2752: l_itemkey po_requisition_headers.wf_item_key%TYPE;
2753:
2754: approverList ame_util.approversTable2;
2755: l_process_out VARCHAR2(10);
2756:

Line 2773: l_authorizationStatus po_requisition_headers_all.AUTHORIZATION_STATUS%type;

2769: l_first_position_id NUMBER;
2770: l_org_id NUMBER;
2771: p_doc_type po_document_types_all_b.document_type_code%type;
2772: p_doc_subtype po_document_types_all_b.document_subtype%type;
2773: l_authorizationStatus po_requisition_headers_all.AUTHORIZATION_STATUS%type;
2774: l_change_pending_flag po_requisition_headers_all.CHANGE_PENDING_FLAG%type;
2775: l_approval_reqd_flag PO_CHANGE_REQUESTS.APPROVAL_REQUIRED_FLAG%type;
2776:
2777: BEGIN

Line 2774: l_change_pending_flag po_requisition_headers_all.CHANGE_PENDING_FLAG%type;

2770: l_org_id NUMBER;
2771: p_doc_type po_document_types_all_b.document_type_code%type;
2772: p_doc_subtype po_document_types_all_b.document_subtype%type;
2773: l_authorizationStatus po_requisition_headers_all.AUTHORIZATION_STATUS%type;
2774: l_change_pending_flag po_requisition_headers_all.CHANGE_PENDING_FLAG%type;
2775: l_approval_reqd_flag PO_CHANGE_REQUESTS.APPROVAL_REQUIRED_FLAG%type;
2776:
2777: BEGIN
2778:

Line 2799: from po_requisition_headers_all

2795: l_first_approver_id,
2796: l_org_id,
2797: l_authorizationStatus,
2798: l_change_pending_flag
2799: from po_requisition_headers_all
2800: where pReqHeaderId = requisition_header_id;
2801:
2802: --PO_MOAC_UTILS_PVT.set_org_context(l_org_id);
2803:

Line 2869: FROM po_requisition_headers_all

2865:
2866: begin
2867: SELECT type_lookup_code
2868: INTO p_doc_subtype
2869: FROM po_requisition_headers_all
2870: WHERE requisition_header_id = pReqHeaderId;
2871:
2872: exception
2873: when others then

Line 3205: l_itemtype po_requisition_headers.wf_item_type%TYPE;

3201: x_approverId OUT NOCOPY NUMBER,
3202: x_approverName OUT NOCOPY VARCHAR2
3203: ) IS
3204:
3205: l_itemtype po_requisition_headers.wf_item_type%TYPE;
3206: l_itemkey po_requisition_headers.wf_item_key%TYPE;
3207: l_ameTransactionType po_document_types.ame_transaction_type%TYPE;
3208: l_completeYNO varchar2(100);
3209:

Line 3206: l_itemkey po_requisition_headers.wf_item_key%TYPE;

3202: x_approverName OUT NOCOPY VARCHAR2
3203: ) IS
3204:
3205: l_itemtype po_requisition_headers.wf_item_type%TYPE;
3206: l_itemkey po_requisition_headers.wf_item_key%TYPE;
3207: l_ameTransactionType po_document_types.ame_transaction_type%TYPE;
3208: l_completeYNO varchar2(100);
3209:
3210: l_approversList ame_util.approversTable2;

Line 3244: from po_requisition_headers_all

3240: x_progress := '003';
3241:
3242: select PREPARER_ID
3243: into l_preparer_id
3244: from po_requisition_headers_all
3245: where pReqHeaderId = requisition_header_id;
3246:
3247: x_progress := '004';
3248:

Line 3355: from po_requisition_headers_all

3351: end if;
3352:
3353: select first_position_id, first_approver_id
3354: into l_first_position_id, l_first_approver_id
3355: from po_requisition_headers_all
3356: where p_reqHeaderId = requisition_header_id;
3357:
3358: if p_logFlag = 'Y' then
3359: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_STATEMENT) THEN